release v1.8.0 (#91) #7
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: | |
| - "v[1-9]+.[0-9]+.[0-9]+" | |
| env: | |
| NODE: 20 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE }} | |
| cache: 'npm' | |
| - name: Install node dependencies | |
| run: npm ci | |
| - name: Build everything | |
| run: npm run build-all | |
| - name: Get version from package.json | |
| run: echo "LATEST_VER=$(npm pkg get version | tr -d '\"')" >> $GITHUB_ENV | |
| - name: Setup release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| files: QWeather-Icons-${{ env.LATEST_VER }}.zip | |
| body_path: CHANGELOG.txt | |
| publish: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE }} | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Publish on npm | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |