Skip to content

Commit

Permalink
release from github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmarin committed Feb 3, 2023
1 parent fe8c09f commit f35c195
Showing 1 changed file with 14 additions and 36 deletions.
50 changes: 14 additions & 36 deletions .github/workflows/onpush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ jobs:
run: |
go install github.com/mattn/goveralls@latest;
goveralls -coverprofile=c.out -service=github;
release-linux:
name: Release app for linux
runs-on: ubuntu-latest
release:
name: Release app
needs:
- test
strategy:
matrix:
include:
- goos: linux
os: ubuntu-22.04
- goos: darwin
os: macos-12
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v3
Expand All @@ -50,46 +57,17 @@ jobs:
- name: Setup
run: |
export PATH=$PATH:/tmp;
wget -qO - "https://github.com/go-task/task/releases/download/v2.2.1/task_linux_amd64.tar.gz" | tar zxf - -C /tmp task;
ls -la /tmp/task;
task --version;
- name: Build binary files
run: |
export PATH=$PATH:/tmp;
BINARY_PATH="release/syml" CGO_ENABLED=0 GOOS=linux GOARCH=amd64 task compile;
ls release/;
- name: Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
files: release/syml-linux
draft: true
release-macos:
name: Release app for macos
runs-on: macos-12
needs:
- test
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Checkout
uses: actions/checkout@v3
- name: Setup
run: |
export PATH=$PATH:/tmp;
wget -qO - "https://github.com/go-task/task/releases/download/v2.2.1/task_darwin_amd64.tar.gz" | tar zxf - -C /tmp task;
wget -qO - "https://github.com/go-task/task/releases/download/v2.2.1/task_${{ matrix.goos }}_amd64.tar.gz" | tar zxf - -C /tmp task;
ls -la /tmp/task;
task --version;
- name: Build binary files
run: |
export PATH=$PATH:/tmp;
BINARY_PATH="release/syml" CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 task compile;
BINARY_PATH="release/syml" CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=amd64 task compile;
ls release/;
- name: Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/syml-darwin
files: release/syml-${{ matrix.goos }}
draft: true

0 comments on commit f35c195

Please sign in to comment.