Bump version #27
Workflow file for this run
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 | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: nixbuild/nix-quick-install-action@v30 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: nix-community/cache-nix-action@v6 | |
| with: | |
| primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | |
| restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }} | |
| - run: nix develop --command npm ci | |
| - run: nix develop --command npm run build | |
| - run: ls -lhR dist | |
| - run: cp .github/.npmrc . | |
| - run: nix develop --ignore-environment --keep NODE_AUTH_TOKEN --command npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| - name: Create the release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| TITLE=$(echo "${{ github.ref_name }}" | sed -e 's/^v//') | |
| gh release create ${{ github.ref_name }} --draft --verify-tag --title "$TITLE" | |
| - name: Upload the assets to the release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ github.ref_name }} dist/bundle/asciinema-player.min.js | |
| gh release upload ${{ github.ref_name }} dist/bundle/asciinema-player.css |