Skip to content

Commit

Permalink
Merge pull request #10 from salemove/fix-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
take-five authored Sep 2, 2024
2 parents 1be9489 + fd3baaa commit f4112c3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 36 deletions.
63 changes: 28 additions & 35 deletions .github/workflows/release-on-master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:

env:
# Common versions
GO_VERSION: '1.22.4'
GO_VERSION: '1.22.5'
GOLANGCI_LINT_VERSION: '1.59.1'

jobs:
test:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -32,42 +32,32 @@ jobs:
- name: Run tests
run: make test

build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
os:
- linux
- darwin
arch:
- amd64
- arm64
steps:
- uses: actions/checkout@v4
- name: Create releases directory
run: mkdir releases

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Build for Linux (amd64)
run: make build OUTPUT_PATH=releases/regexp_utility-$GOOS-$GOARCH
env:
GOOS: linux
GOARCH: amd64

- name: Create releases directory
run: mkdir releases
- name: Build for Linux (arm64)
run: make build OUTPUT_PATH=releases/regexp_utility-$GOOS-$GOARCH
env:
GOOS: linux
GOARCH: arm64

- name: Build
run: make build OUTPUT_PATH=releases/regexp_utility-${{ matrix.os }}-${{ matrix.arch }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
- name: Build for Intel based Macs (amd64)
run: make build OUTPUT_PATH=releases/regexp_utility-$GOOS-$GOARCH
env:
GOOS: darwin
GOARCH: amd64

release:
runs-on: ubuntu-latest
needs:
- test
- build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build for Apple Silicon based Macs (arm64)
run: make build OUTPUT_PATH=releases/regexp_utility-$GOOS-$GOARCH
env:
GOOS: darwin
GOARCH: arm64

- name: Generate release tag
id: gen_tag
Expand All @@ -86,4 +76,7 @@ jobs:
tag_name: ${{ steps.gen_tag.outputs.release_tag }}
generate_release_notes: true
files: |
releases/regexp_utility-*
releases/regexp_utility-linux-amd64
releases/regexp_utility-linux-arm64
releases/regexp_utility-darwin-amd64
releases/regexp_utility-darwin-arm64
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
# Common versions
GO_VERSION: '1.22.4'
GO_VERSION: '1.22.5'
GOLANGCI_LINT_VERSION: 'v1.59.1'

jobs:
Expand Down

0 comments on commit f4112c3

Please sign in to comment.