v4.0 Warframe Task Checklist - Release Notes #15
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: Create File-Friendly Release | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build_release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref }} | |
| - name: Get Tag Name or Ref for Archives | |
| id: get_ref_name | |
| run: | | |
| if [ "${{ github.event_name }}" == "release" ]; then | |
| echo "REF_FOR_ARCHIVE=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | |
| else | |
| RAW_REF_NAME=$(echo "${{ github.ref }}" | sed -e 's|refs/heads/||' -e 's|refs/tags/||') | |
| SANITIZED_REF_NAME=$(echo "${RAW_REF_NAME}" | sed 's/[^a-zA-Z0-9._-]/-/g') | |
| echo "REF_FOR_ARCHIVE=${SANITIZED_REF_NAME:-manual-run}" >> $GITHUB_ENV | |
| fi | |
| env: | |
| REF_FOR_ARCHIVE: '' | |
| - name: Define Base Archive Name | |
| id: set_base_name | |
| run: | | |
| echo "ARCHIVE_BASE_NAME=Task-Checklist-${{ env.REF_FOR_ARCHIVE }}" >> $GITHUB_OUTPUT | |
| echo "Using archive base name: Task-Checklist-${{ env.REF_FOR_ARCHIVE }}" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project with Vite | |
| run: npm run build-release | |
| - name: Rename Release File | |
| run: | | |
| cd ./release | |
| mv index.html ${{ steps.set_base_name.outputs.ARCHIVE_BASE_NAME }}.html | |
| - name: Upload Release with gh CLI | |
| if: github.event_name == 'release' && github.event.release.tag_name | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload "${{ github.event.release.tag_name }}" "./release/${{ steps.set_base_name.outputs.ARCHIVE_BASE_NAME }}.html" --clobber | |
| - name: Upload Source Directory as Artifact (for manual/dispatch runs) | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.set_base_name.outputs.ARCHIVE_BASE_NAME }} | |
| path: ./release/${{ steps.set_base_name.outputs.ARCHIVE_BASE_NAME }}.html |