Fixes invalidated module not resolving promises (#349) #29
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' | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: enable corepack | |
| run: corepack enable | |
| shell: bash | |
| - name: Cache dependencies | |
| id: yarn-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/node_modules | |
| .yarn/install-state.gz | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | |
| ${{ runner.os }}-yarn- | |
| - run: yarn install | |
| - name: Update package.json version | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| jq --arg version "$TAG_NAME" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json | |
| - uses: JS-DevTools/npm-publish@v3 | |
| with: | |
| token: ${{ secrets.NPM_TOKEN }} | |
| - name: Create Github Release | |
| uses: elgohr/Github-Release-Action@v5 | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| title: Release ${{ github.ref_name }} | |
| tag: ${{ github.ref_name }} |