feat(env): add ZANA_HOME env check (#4) #14
Workflow file for this run
This file contains hidden or 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: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build-linux: | |
name: Build for Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up env | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "PLATFORM=linux" >> $GITHUB_ENV | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Build for Linux | |
run: ./scripts/build.sh | |
- name: Release for Linux | |
run: ./scripts/release.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-macos: | |
name: Build for macOS | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up env | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "PLATFORM=macos" >> $GITHUB_ENV | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Build for macOS | |
run: ./scripts/build.sh | |
- name: Setting up Apple certificate | |
run: | | |
echo "${{ secrets.APPLE_CERTIFICATE_BASE64 }}" > apple-cert.p12.base64 | |
base64 -d apple-cert.p12.base64 > apple-cert.p12 | |
- name: Sign a amd64 macOS binary | |
uses: indygreg/apple-code-sign-action@v1 | |
with: | |
input_path: dist/zana-darwin-amd64 | |
p12_file: apple-cert.p12 | |
p12_password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
- name: Sign a arm64 macOS binary | |
uses: indygreg/apple-code-sign-action@v1 | |
with: | |
input_path: dist/zana-darwin-arm64 | |
p12_file: apple-cert.p12 | |
p12_password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
- name: Release for macOS | |
run: ./scripts/release.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-windows: | |
name: Build for Windows | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up env | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "PLATFORM=windows" >> $GITHUB_ENV | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Build for Windows | |
run: ./scripts/build.sh | |
- name: Release for Windows | |
run: ./scripts/release.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |