mirror of
https://github.com/waybarrios/opencode-power-pack.git
synced 2026-11-18 18:03:43 +00:00
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
name: Publish GitHub Package
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: Release tag to publish, for example v0.5.0
|
|
required: true
|
|
default: v0.5.0
|
|
|
|
concurrency:
|
|
group: github-package-${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.event.release.tag_name }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish npm package to GitHub Packages
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
env:
|
|
RELEASE_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.event.release.tag_name }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
ref: ${{ env.RELEASE_REF }}
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version: "20"
|
|
registry-url: "https://npm.pkg.github.com"
|
|
scope: "@waybarrios"
|
|
- run: npm ci
|
|
- name: Verify tag matches package version
|
|
run: |
|
|
node --input-type=module -e '
|
|
import fs from "node:fs";
|
|
const { version } = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
|
const expected = `v${version}`;
|
|
if (process.env.RELEASE_REF !== expected) {
|
|
console.error(`Release ref ${process.env.RELEASE_REF} does not match package version ${expected}`);
|
|
process.exit(1);
|
|
}
|
|
'
|
|
- name: Publish release to GitHub Packages
|
|
run: npm publish --ignore-scripts --registry=https://npm.pkg.github.com --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|