From 1d4156bdfeb97fbbcdd0efb2fc73bdaa50dbfaaa Mon Sep 17 00:00:00 2001 From: Steven Tang Date: Fri, 30 Sep 2022 22:35:03 +1000 Subject: [PATCH 1/2] chore(build): remove gcc dependency --- .github/workflows/release.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4965c42..46d1b00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,10 @@ name: Release on: - release: - types: - - published + push: +# release: +# types: +# - published jobs: release: @@ -15,12 +16,9 @@ jobs: - platform: ubuntu-18.04 GOOS: linux GOARCH: amd64 - CC: gcc - platform: ubuntu-18.04 - package: gcc-aarch64-linux-gnu GOOS: linux GOARCH: arm64 - CC: aarch64-linux-gnu-gcc - platform: windows-latest GOOS: windows GOARCH: amd64 @@ -43,10 +41,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Install gcc - if: "${{ matrix.package != '' }}" - run: sudo apt-get update && sudo apt-get -y install ${{ matrix.package }} - - name: Set version shell: bash run: | @@ -63,8 +57,8 @@ jobs: working-directory: ./dist shell: bash run: | - GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} \ - CC=${{ matrix.CC }} CGO_ENABLED=0 go build -v -ldflags '-w -s' ../ + GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} CGO_ENABLED=0 \ + go build -v -ldflags '-w -s' ../ - name: Compress working folder (Windows PowerShell) working-directory: ./dist @@ -78,7 +72,13 @@ jobs: run: | zip -9 wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip * - - name: Upload built executable to Release - uses: softprops/action-gh-release@v1 + - name: Archive zip + uses: actions/upload-artifact@v3 with: - files: ./dist/*.zip + name: wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip + path: dist/wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip + + # - name: Upload built executable to Release + # uses: softprops/action-gh-release@v1 + # with: + # files: ./dist/*.zip From 018cc50fb88a2a28ea0f0158eaad07a0dce0a221 Mon Sep 17 00:00:00 2001 From: Steven Tang Date: Fri, 30 Sep 2022 22:43:43 +1000 Subject: [PATCH 2/2] chore(release): reinclude ci conditions --- .github/workflows/ci.yml | 2 -- .github/workflows/release.yml | 19 ++++++------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaf49a6..dae6f37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,7 @@ name: ci on: push: - branches: [ master ] pull_request: - branches: [ master ] jobs: test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46d1b00..5a244ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ name: Release on: - push: -# release: -# types: -# - published + release: + types: + - published jobs: release: @@ -72,13 +71,7 @@ jobs: run: | zip -9 wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip * - - name: Archive zip - uses: actions/upload-artifact@v3 + - name: Upload built executable to Release + uses: softprops/action-gh-release@v1 with: - name: wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip - path: dist/wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip - - # - name: Upload built executable to Release - # uses: softprops/action-gh-release@v1 - # with: - # files: ./dist/*.zip + files: ./dist/*.zip