Merge pull request #204 from Open-STEM/kq-bugs #47
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
| # github workflow to make a release | |
| name: Create release based on a tag | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger when a tag like v1.0.0 is pushed | |
| permissions: | |
| contents: write # Grants write permission to repository contents | |
| jobs: | |
| release: | |
| name: Release pushed tag | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: test | |
| run: npm run test | |
| - name: Build | |
| run: npm run build | |
| - name: Archive site content | |
| uses: thedoctor0/zip-release@master | |
| with: | |
| type: 'zip' | |
| directory: './dist' | |
| filename: ../xrpweb-v${{ github.run_number }}.zip | |
| - name: Debug - List files | |
| run: | | |
| ls -la | |
| ls -la dist/ | |
| - name: Create Release | |
| id: create_new_release | |
| uses: softprops/action-gh-release@v2.3.3 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Build artifacts | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: xrpweb-v${{ github.run_number }}.zip | |
| asset_name: artifacts.zip | |
| tag: ${{ github.ref }} | |
| overwrite: true |