From cd97f4c9fe0e696ea830ce01e67c99159d7f8500 Mon Sep 17 00:00:00 2001 From: RythenGlyth Date: Tue, 10 Sep 2024 13:47:21 +0200 Subject: [PATCH] new workflow with matrix --- .github/workflows/build-release-binaries.yml | 31 ------------------- .github/workflows/release.yml | 32 ++++++++++++++++++++ 2 files changed, 32 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/build-release-binaries.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml deleted file mode 100644 index b2727a3..0000000 --- a/.github/workflows/build-release-binaries.yml +++ /dev/null @@ -1,31 +0,0 @@ -# workflow name -name: Generate release-artifacts - -# on events -on: - release: - types: - - created - -# workflow tasks -jobs: - generate: - name: Generate cross-platform builds - runs-on: ubuntu-latest - steps: - - name: Checkout the repository - uses: actions/checkout@v2 - - name: Generate build files - uses: RythenGlyth/go-cross-build@master - with: - platforms: 'darwin/amd64, darwin/arm64, linux/386, linux/amd64, linux/arm, linux/arm64, linux/mips, linux/mips64, linux/mips64le, linux/mipsle, linux/ppc64, linux/ppc64le, linux/riscv64, linux/s390x, netbsd/386, netbsd/amd64, netbsd/arm, netbsd/arm64, openbsd/386, openbsd/amd64, openbsd/arm, openbsd/arm64, openbsd/mips64, windows/386, windows/amd64, windows/arm, windows/arm64' - package: '' - name: 'masterclass-dl' - compress: 'false' - dest: 'dist' - - name: Upload build-artifacts - uses: skx/github-action-publish-binaries@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: "./dist/*" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..962a891 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +# workflow name +name: Generate release-artifacts + +on: + release: + types: [created] + +permissions: + contents: read + packages: write + +# workflow tasks +jobs: + release-matrix: + name: Release Go binaries + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, darwin, windows, freebsd] + goarch: [amd64, 386, arm64, arm] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.23.1 + - name: Build + run: go build -o masterclass-dl-${{ matrix.goos }}-${{ matrix.goarch }} . + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: masterclass-dl-${{ matrix.goos }}-${{ matrix.goarch }} + path: masterclass-dl-${{ matrix.goos }}-${{ matrix.goarch }} \ No newline at end of file