-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- os: linux | ||
arch: amd64 | ||
asset_name: myapp-linux-amd64 | ||
- os: windows | ||
arch: amd64 | ||
asset_name: myapp-windows-amd64 | ||
- os: darwin | ||
arch: amd64 | ||
asset_name: myapp-macos-intel | ||
- os: darwin | ||
arch: arm64 | ||
asset_name: myapp-macos-arm | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22' | ||
|
||
- name: Build Go app | ||
run: | | ||
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o ${{ matrix.asset_name }} | ||
- name: Package Python scripts | ||
run: | | ||
mkdir release | ||
cp -r scramScripts/scram2Plot release/ | ||
mv ${{ matrix.asset_name }} release/ | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.asset_name }} | ||
path: release | ||
|
||
- name: Create release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload release assets | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: release/${{ matrix.asset_name }} | ||
asset_name: ${{ matrix.asset_name }}.tar.gz | ||
asset_content_type: application/gzip |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Ignore hidden files and directories | ||
.* | ||
|
||
!/.gitignore | ||
|
||
# Ignore cache files and directories | ||
|