Making release depend on build #3
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: Create Release | |
| on: | |
| push: | |
| pull_request: | |
| tags: v*.* | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build Website | |
| run: npm run bundle | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bundle | |
| path: output/ | |
| release: | |
| name: Create Release | |
| needs: build | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bundle | |
| - name: List downloaded files | |
| run: ls -R | |
| - name: Create Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ github.ref_name }} | |
| run: | | |
| gh release create "${tag}" \ | |
| --title="Version ${tag#v}" \ | |
| --notes-from-tag \ | |
| output/*.json |