-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (21 loc) · 866 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
on:
pull_request:
branches: ["*"]
tags-ignore:
- "release-please--*" # Exclude tags containing "staging"
name: test build
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v5
with:
go-version: "^1.23.3"
- name: Build project and prepare release artifact
run: |
env GOOS=darwin GOARCH=arm64 go build -ldflags "-X github.com/y3owk1n/cpenv/cmd.Version=${{ steps.release.outputs.tag_name }}" -o ./compile/cpenv-darwin-arm64 ./main.go
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/y3owk1n/cpenv/cmd.Version=${{ steps.release.outputs.tag_name }}" -o ./compile/cpenv-darwin-amd64 ./main.go