Release #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
release-linux-windows: | |
name: Release for Linux and Windows | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [linux, windows] | |
goarch: [amd64, arm64] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: wangyoucao577/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
goos: ${{ matrix.goos }} | |
goarch: ${{ matrix.goarch }} | |
goversion: go.mod | |
project_path: "./cmd/" | |
extra_files: README.md LICENSE | |
md5sum: FALSE | |
sha256sum: FALSE | |
release-macos: | |
name: Release for macOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Compile ARM64 | |
run: | | |
GOOS=darwin GOARCH=arm64 make compile | |
mv ./aws-mfa ./aws-mfa-arm64 | |
- name: Compile AMD64 | |
run: | | |
GOOS=darwin GOARCH=amd64 make compile | |
mv ./aws-mfa ./aws-mfa-amd64 | |
- name: Universal binary | |
run: lipo -create -output aws-mfa ./aws-mfa-arm64 ./aws-mfa-amd64 | |
- uses: apple-actions/import-codesign-certs@v3 | |
with: | |
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }} | |
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }} | |
- uses: halprin/macos-sign-package-notarize@v1 | |
with: | |
path-to-binary: ./aws-mfa | |
signing-identity: ${{ secrets.SIGNING_IDENTITY }} | |
apple-id: ${{ secrets.APPLE_ID }} | |
app-specific-password: ${{ secrets.APP_SPECIFIC_PASSWORD }} | |
apple-developer-team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }} | |
extra-files: README.md LICENSE | |
archive-disk-name: AWS MFA | |
archive-file-path: ./aws-mfa-${{ github.event.release.tag_name }}-macos.dmg | |
- name: Upload Release Asset | |
run: gh release upload ${{ github.event.release.tag_name }} ./aws-mfa-${{ github.event.release.tag_name }}-macos.dmg --clobber | |
env: | |
GH_TOKEN: ${{ github.token }} |