chore: clean import #64
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: goreleaser | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| workflow_dispatch: | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.PAT_TOKEN }} | |
| submodules: recursive | |
| - name: Install upx | |
| run: sudo apt install upx -y | |
| continue-on-error: true | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.20" | |
| - run: go version | |
| - name: Configure Git | |
| run: | | |
| git config --global url."https://${{ secrets.PAT_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Set Version Info | |
| run: | | |
| if [ -n "$GITHUB_REF" ] && [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| else | |
| echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
| fi | |
| echo "COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v4 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --snapshot --clean --skip=publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| GOPATH: "/home/runner/go" | |
| VERSION: ${{ env.VERSION }} | |
| COMMIT: ${{ env.COMMIT }} | |
| CGO_ENABLED: 0 | |
| - name: Download IoM-gui VSIX | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| repository: "chainreactors/IoM-gui" | |
| latest: true | |
| fileName: "iom.vsix" | |
| token: ${{ secrets.PAT_TOKEN }} | |
| out-file-path: "dist/vsix" | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: Release ${{ steps.version.outputs.new_tag }} | |
| tag_name: ${{ steps.version.outputs.new_tag }} | |
| draft: true | |
| files: | | |
| dist/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |