From a3c5c7441f8dc7fbe4518450db5cf1a8a6b072bd Mon Sep 17 00:00:00 2001 From: containerscrew <131241415+containerscrew@users.noreply.github.com> Date: Fri, 17 Nov 2023 21:33:28 +0100 Subject: [PATCH] Packaging binaries --- .github/workflows/release.yml | 70 +++++++++++++++++------------------ Makefile | 2 +- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fdbc555..32da69a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,23 +19,23 @@ jobs: bin: aws-sso-auth command: build - - release_for: linux-x86_64 - os: ubuntu-latest - target: x86_64-unknown-linux-musl - bin: aws-sso-auth - command: build - - - release_for: macOS-x86_64 - os: macOS-latest - target: x86_64-apple-darwin - bin: aws-sso-auth - command: build - - - release_for: macOS-arm64 - os: macOS-latest - target: aarch64-apple-darwin - bin: aws-sso-auth - command: build +# - release_for: linux-x86_64 +# os: ubuntu-latest +# target: x86_64-unknown-linux-musl +# bin: aws-sso-auth +# command: build +# +# - release_for: macOS-x86_64 +# os: macOS-latest +# target: x86_64-apple-darwin +# bin: aws-sso-auth +# command: build +# +# - release_for: macOS-arm64 +# os: macOS-latest +# target: aarch64-apple-darwin +# bin: aws-sso-auth +# command: build runs-on: ${{ matrix.platform.os }} steps: @@ -52,19 +52,19 @@ jobs: target: ${{ matrix.platform.target }} args: "--release" strip: true - - uses: mislav/bump-homebrew-formula-action@v3 - with: - # By default, this will edit the `my_formula.rb` formula in - # homebrew-core to update its "url" field to: - # `https://github.com/OWNER/REPO/archive/refs/tags/.tar.gz` - # The "sha256" formula field will get automatically recomputed. - formula-name: aws-sso-auth - env: - # the personal access token should have "repo" & "workflow" scopes - COMMITTER_TOKEN: ${{ secrets.RELEASE_TOKEN }} +# - uses: mislav/bump-homebrew-formula-action@v3 +# with: +# # By default, this will edit the `my_formula.rb` formula in +# # homebrew-core to update its "url" field to: +# # `https://github.com/OWNER/REPO/archive/refs/tags/.tar.gz` +# # The "sha256" formula field will get automatically recomputed. +# formula-name: aws-sso-auth +# env: +# # the personal access token should have "repo" & "workflow" scopes +# COMMITTER_TOKEN: ${{ secrets.RELEASE_TOKEN }} - name: Package zip run: | - zip -j aws-sso-auth-${{ matrix.platform.release_for }}.zip target/${{ matrix.platform.target }}/release/aws-sso-auth + make package ARCH=${{ matrix.platform.release_for }} TARGET=${{ matrix.platform.target }} # - name: Setup Rust # uses: dtolnay/rust-toolchain@v1 @@ -102,10 +102,10 @@ jobs: # if: matrix.os == 'macOS-latest' # run: make release-mac -# - name: Release -# uses: softprops/action-gh-release@v1 -# with: -# body: '[Changelog](https://github.com/containerscrew/aws-sso-auth/blob/main/CHANGELOG.md)' -# files: "*.zip\n" -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 + with: + body: '[Changelog](https://github.com/containerscrew/aws-sso-auth/blob/main/CHANGELOG.md)' + files: "*.zip\n" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index d8c963d..d3f6921 100644 --- a/Makefile +++ b/Makefile @@ -19,4 +19,4 @@ pre-commit: ## Run pre-commit pre-commit run -a package: ## Package binary with zip - zip -j ${BINARY_NAME}-v${VERSION}-arm64-linux.zip target/aarch64-unknown-linux-gnu/release/${BINARY_NAME} + zip -j ${BINARY_NAME}-v${VERSION}-$(ARCH).zip target/$(TARGET)/release/${BINARY_NAME}