Skip to content

Commit

Permalink
update release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
2start committed Jan 16, 2024
1 parent 06e843f commit 9844896
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,70 +45,10 @@ jobs:
uses: actions/download-artifact@v3
with:
path: artifacts

- name: List artifacts
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:
name: Build for macOS ARM
runs-on: ubuntu-latest
strategy:
matrix:
goos: [darwin]
goarch: [arm64]
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21' # Specify the Go version you want to use for building

- name: Check out code
uses: actions/checkout@v3

- name: Build binary
run: |
BINARY_NAME="gptprep-${{ matrix.goos }}-${{ matrix.goarch }}"
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o "${BINARY_NAME}"
- name: Archive binary
uses: actions/upload-artifact@v3
with:
name: gptprep-${{ matrix.goos }}-${{ matrix.goarch }}
path: gptprep-${{ matrix.goos }}-${{ matrix.goarch }}

release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: List artifacts
run: ls -la artifacts/

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ls -la artifacts/

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9844896

Please sign in to comment.