remove note9 and pixel5 hardcode aliases #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | ||
|
Check failure on line 1 in .github/workflows/release.yml
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| bump: | ||
| type: choice | ||
| description: 'Version bump' | ||
| default: 'patch' | ||
| options: [patch, minor, major] | ||
| publish: | ||
| type: boolean | ||
| description: 'Publish to npm' | ||
| default: true | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| jobs: | ||
| go: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: 'main' | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 22 | ||
| cache: 'yarn' | ||
| - name: Enable Corepack & install | ||
| run: | | ||
| corepack enable | ||
| yarn install --immutable | ||
| # Bump version, commit, tag | ||
| - name: Bump version | ||
| id: bump | ||
| run: | | ||
| BUMP="${{ github.event.inputs.bump }}" | ||
| NEW=$(npm version "$BUMP" --no-git-tag-version) | ||
| echo "new=${NEW#v}" >> $GITHUB_OUTPUT | ||
| git add package.json | ||
| git commit -m "chore: release v${NEW#v}" || true | ||
| git tag "v${NEW#v}" | ||
| # Optional: run your E2E bin test | ||
| - name: E2E pack test | ||
| run: | | ||
| if [ -f "scripts/test-e2e.mjs" ]; then | ||
| node scripts/test-e2e.mjs | ||
| fi | ||
| # Assert npm tarball content | ||
| - name: npm pack & assert contents | ||
| run: | | ||
| TARBALL=$(npm pack --json | jq -r '.[0].filename') | ||
| tar -tf "$TARBALL" | sort > actual.txt | ||
| printf '%s\n' 'package.json' 'LICENSE' 'README.md' 'js/tools/audit/audit-auto-approve.ts' > expected.txt | ||
| sort expected.txt -o expected.txt | ||
| diff -u expected.txt actual.txt | ||
| - name: Push tag & main | ||
| run: | | ||
| git push origin HEAD:main | ||
| git push origin --tags | ||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: v${{ steps.bump.outputs.new }} | ||
| name: v${{ steps.bump.outputs.new }} | ||
| generate_release_notes: true | ||
| - name: Publish to npm | ||
| if: ${{ github.event.inputs.publish == 'true' && secrets.NPM_TOKEN != '' }} | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc | ||
| npm publish --provenance --access public | ||