Fix extraFiles #20
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
| # Runs when a new release is published. | |
| name: Cargo Release | |
| on: | |
| release: | |
| types: published | |
| jobs: | |
| extract_tag: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.extract_tag.outputs.tag }} | |
| version: ${{ steps.extract_tag.outputs.version }} | |
| steps: | |
| - name: Extract current tag | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| id: extract_tag | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| echo "tag=$TAG" | tee -a "$GITHUB_OUTPUT" | |
| echo "version=$VERSION" | tee -a "$GITHUB_OUTPUT" | |
| build: | |
| needs: extract_tag | |
| uses: ./.github/workflows/cargo-build.yml | |
| with: | |
| version: ${{ needs.extract_tag.outputs.version }} | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Zip each artifact directory | |
| run: | | |
| for dir in artifacts/*/; do | |
| base=$(basename "$dir") | |
| (cd "$dir" && zip -r "../${base}.zip" .) | |
| done | |
| - name: Bleeding Artifact Upload | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: artifacts/**/*.zip | |
| winget: | |
| runs-on: ubuntu-latest | |
| needs: release | |
| steps: | |
| - name: Check if WINGET_TOKEN is present | |
| id: check_secret | |
| run: | | |
| if [ -z "${{ secrets.WINGET_TOKEN }}" ]; then | |
| echo "WINGET_TOKEN is not set" | |
| echo "winget_token_present=false" >> $GITHUB_ENV | |
| else | |
| echo "WINGET_TOKEN is present" | |
| echo "winget_token_present=true" >> $GITHUB_ENV | |
| fi | |
| - name: Submit to winget | |
| id: winget_deploy | |
| uses: vedantmgoyal9/winget-releaser@main | |
| if: env.winget_token_present == 'true' | |
| with: | |
| identifier: QuestPackageManager.QuestPackageManager | |
| installers-regex: 'installer\.exe$' | |
| fork-user: ${{ secrets.WINGET_FORK_USER }} | |
| token: ${{ secrets.WINGET_TOKEN }} |