From 885015067e1c5a02cfecb735736bb799766e6603 Mon Sep 17 00:00:00 2001 From: Owen Williams Date: Fri, 23 Jun 2023 11:32:18 -0400 Subject: [PATCH] try to do building inside release-please --- .github/workflows/release-please.yml | 41 ++++++++++++++++++++++++++-- .github/workflows/release.yml | 26 ------------------ 2 files changed, 38 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6f342af..b47ff8a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -7,13 +7,48 @@ permissions: contents: write pull-requests: write -name: release-please +env: + DEFAULT_GO_VERSION: 1.20.5 +name: Run Release Please jobs: release-please: runs-on: ubuntu-latest steps: - uses: google-github-actions/release-please-action@v3 + id: release with: - release-type: node - package-name: release-please-action + command: manifest + token: ${{secrets.GITHUB_TOKEN}} + default-branch: main + outputs: + all: ${{ toJSON(steps.release.outputs) }} + releases_created: ${{ steps.release.outputs.releases_created }} + paths_released: ${{ steps.release.outputs.paths_released }} + artifacts: + needs: release-please + runs-on: ubuntu-latest + if: ${{ needs.release-please.outputs.releases_created }} + strategy: + matrix: + release: ${{ fromJSON(needs.release-please.outputs.paths_released) }} + env: + TAG: ${{ fromJSON(needs.release-please.outputs.all)[format('{0}--tag_name', matrix.release)] }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.20 + - name: Build Binaries + run: make build + - name: Bundle release assets + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ env.TAG }} + files: | + README.md + CHANGELOG.md + LICENSE + ./dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f757e22..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -# .github/workflows/release.yaml - -on: - release: - types: [created] - -jobs: - releases-matrix: - name: Release Go Binaries - runs-on: ubuntu-latest - strategy: - matrix: - goos: [linux, windows, darwin] - goarch: [amd64, arm64] - exclude: - - goarch: arm64 - goos: windows - steps: - - uses: actions/checkout@v3 - - uses: wangyoucao577/go-release-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - goos: ${{ matrix.goos }} - goarch: ${{ matrix.goarch }} - build_command: "make build" - extra_files: LICENSE README.md CHANGELOG.md \ No newline at end of file