Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Packaging binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
containerscrew committed Nov 17, 2023
1 parent 3fddee8 commit a3c5c74
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/<tag-name>.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/<tag-name>.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
Expand Down Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit a3c5c74

Please sign in to comment.