Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/just-cameron/tangled-cli. Automation-first CLI for Tangled.org
Something went wrong. Try again.
3.3 kB · 97 lines
YAML
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798name: Release
on: push: tags: - 'v*'
permissions: contents: read
jobs: verify: runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 - run: bun install --frozen-lockfile - run: bun run check - name: Verify tag matches package version shell: bash run: | test "${GITHUB_REF_NAME#v}" = "$(node -p "require('./package.json').version")" || { echo "Tag $GITHUB_REF_NAME does not match package.json version" >&2 exit 1 }
binaries: needs: verify strategy: matrix: include: - runner: ubuntu-latest target: bun-linux-x64 artifact: tang-linux-x64 - runner: ubuntu-24.04-arm target: bun-linux-arm64 artifact: tang-linux-arm64 - runner: macos-13 target: bun-darwin-x64 artifact: tang-darwin-x64 - runner: macos-14 target: bun-darwin-arm64 artifact: tang-darwin-arm64 - runner: windows-latest target: bun-windows-x64 artifact: tang-windows-x64.exe runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 - run: bun install --frozen-lockfile - run: bun run build:binary -- --target ${{ matrix.target }} --output artifacts/${{ matrix.artifact }} - name: Create checksum shell: bash run: | cd artifacts if command -v sha256sum >/dev/null; then sha256sum '${{ matrix.artifact }}' > '${{ matrix.artifact }}.sha256'; else shasum -a 256 '${{ matrix.artifact }}' > '${{ matrix.artifact }}.sha256'; fi - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: ${{ matrix.artifact }} path: artifacts/*
release: needs: binaries runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: path: artifacts merge-multiple: true - name: Publish GitHub release env: GH_TOKEN: ${{ github.token }} run: gh release create '${{ github.ref_name }}' artifacts/* --generate-notes --verify-tag
npm: needs: binaries runs-on: ubuntu-latest permissions: contents: read id-token: write steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 22 registry-url: https://registry.npmjs.org - run: bun install --frozen-lockfile - run: bun run build - name: Publish npm package with provenance run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}