fix: enable platform detection for WinGet multi-arch support #59
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: write | |
| discussions: write # 添加 discussions 权限 | |
| issues: write # 添加 issues 权限 | |
| jobs: | |
| build: | |
| name: Build and Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| - name: Extract version | |
| id: version | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG_NAME#v} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo $VERSION | |
| # echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV | |
| - name: test Env setting work or not | |
| env: | |
| JRELEASER_PROJECT_VERSION: ${{ env.VERSION }} | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "---whywhathow-test-----" | |
| echo $VERSION | |
| echo $JRELEASER_PROJECT_VERSION | |
| - name: Jreleaser Assemble | |
| uses: jreleaser/release-action@v2 | |
| with: | |
| arguments: assemble | |
| env: | |
| JRELEASER_PROJECT_VERSION: ${{ env.VERSION }} | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| - name: JReleaser assemble output | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| retention-days: 1 | |
| name: jreleaser-assemble | |
| path: | | |
| out/jreleaser/trace.log | |
| out/jreleaser/output.properties | |
| - name: Jreleaser Release | |
| uses: jreleaser/release-action@v2 | |
| with: | |
| arguments: release | |
| env: | |
| JRELEASER_PROJECT_VERSION: ${{ env.VERSION }} | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| - name: JReleaser release output | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| retention-days: 1 | |
| name: jreleaser-release | |
| path: | | |
| out/jreleaser/trace.log | |
| out/jreleaser/output.properties | |
| - name: Jreleaser Package | |
| uses: jreleaser/release-action@v2 | |
| with: | |
| arguments: package | |
| env: | |
| JRELEASER_PROJECT_VERSION: ${{ env.VERSION }} | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| - name: JReleaser package output | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| retention-days: 1 | |
| name: jreleaser-package | |
| path: | | |
| out/jreleaser/trace.log | |
| out/jreleaser/output.properties | |
| out/jreleaser/package/ |