Skip to content

Workflow file for this run

name: Release and publish trzsz-go
on:
release:
types: [released]
jobs:
release-and-publish:
name: Release and publish trzsz-go
runs-on: ubuntu-latest
steps:
- name: Checkout trzsz-go
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --skip=publish
- name: Upload Release Assets
uses: trzsz/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ github.event.release.id }}
assets_path: |
dist/*.tar.gz
dist/*.zip
dist/*.rpm
dist/*_checksums.txt
- name: Publish rpm to Gemfury
env:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
run: |
for filename in dist/trzsz*.rpm; do
curl -F package=@"$filename" https://{$FURY_TOKEN}@push.fury.io/trzsz/
done
compile-inno-setup:
name: Compile setup and publish
needs: release-and-publish
runs-on: windows-latest
defaults:
run:
working-directory: inno_setup
steps:
- name: Checkout trzsz-go
uses: actions/checkout@v4
- name: Get trzsz-go version
id: trzsz-go-version
uses: actions/github-script@v6
with:
github-token: NO_NEED
result-encoding: string
script: return "${{ github.event.release.tag_name }}".substring(1)
- name: Install Inno Setup
run: |
curl --retry 10 --retry-all-errors -L -o installer.exe https://jrsoftware.org/download.php/is.exe
./installer.exe /verysilent /allusers /dir=inst
sleep 60
- name: Download trzsz-go packages
env:
TRZSZ_VERSION: ${{ steps.trzsz-go-version.outputs.result }}
DOWNLOAD_URL: https://github.com/${{ github.event.repository.full_name }}/releases/download
run: |
curl -L -o i386.zip ${{ env.DOWNLOAD_URL }}/v${{ env.TRZSZ_VERSION }}/trzsz_${{ env.TRZSZ_VERSION }}_windows_i386.zip && unzip i386.zip
curl -L -o x86_64.zip ${{ env.DOWNLOAD_URL }}/v${{ env.TRZSZ_VERSION }}/trzsz_${{ env.TRZSZ_VERSION }}_windows_x86_64.zip && unzip x86_64.zip
curl -L -o aarch64.zip ${{ env.DOWNLOAD_URL }}/v${{ env.TRZSZ_VERSION }}/trzsz_${{ env.TRZSZ_VERSION }}_windows_aarch64.zip && unzip aarch64.zip
- name: Compile by Inno Setup
env:
TRZSZ_VERSION: ${{ steps.trzsz-go-version.outputs.result }}
run: |
./inst/iscc trzsz_windows_i386.iss
./inst/iscc trzsz_windows_x86_64.iss
./inst/iscc trzsz_windows_aarch64.iss
- name: Upload Inno Setup Assets
uses: trzsz/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ github.event.release.id }}
assets_path: inno_setup/Output/*.exe