From b3aaad1d8d98e2c8d2bf14cb9c4341e5d7705ae8 Mon Sep 17 00:00:00 2001 From: Sean Enck Date: Tue, 22 Oct 2024 16:53:31 -0400 Subject: [PATCH] try a release concepts --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..68bbfb0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: release + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, darwin] + goarch: [amd64, arm64] + steps: + - name: checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: go + uses: actions/setup-go@v5 + with: + go-version: 1.23 + - name: deps + run: "sudo apt-get update && sudo apt-get install just" + - name: "build" + env: + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} + run: just clean default + - name: "compress" + run: "zip -r ${{ matrix.goos }}-${{ matrix.goarch }}.zip target/" + - name: "upload" + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.goos }}-${{ matrix.goarch }} + path: *.zip + release: + runs-on: ubuntu-latest + steps: + - name: download + uses: actions/download-artifact@v2 + - name: release + uses: softprops/action-gh-release@v2 + files: "*.zip"