-
Notifications
You must be signed in to change notification settings - Fork 21
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
black-sliver
committed
Apr 17, 2021
1 parent
d115c63
commit 07667e9
Showing
1 changed file
with
61 additions
and
0 deletions.
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,61 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
|
||
release-main: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | ||
- name: Create Release | ||
uses: softprops/action-gh-release@b7e450da2a4b4cb4bfbae528f788167786cfcedf | ||
with: | ||
draft: true | ||
prerelease: true | ||
name: PopTracker v${{ env.RELEASE_VERSION }} | ||
body: | | ||
see [CHANGELOG.md](../v${{ env.RELEASE_VERSION }}/CHANGELOG.md) | ||
and [README.md](../v${{ env.RELEASE_VERSION }}/README.md) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release-macos: | ||
|
||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Install dependencies | ||
run: | | ||
brew install coreutils SDL2 sdl2_ttf sdl2_image | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | ||
- name: Build RELEASE | ||
run: make native CONF=RELEASE VERSION=${{ env.RELEASE_VERSION }} -j3 | ||
- name: Run tests | ||
run: make test CONF=RELEASE VERSION=${{ env.RELEASE_VERSION }} | ||
- name: Get version | ||
run: | | ||
echo "POP_VERSION=`./build/darwin-x86_64/poptracker --version`" >> $GITHUB_ENV | ||
echo "POP_NAME=poptracker_`./build/darwin-x86_64/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV | ||
- name: Build DIST # this builds the app bundle, zips it and maybe .dmg in the future | ||
run: make CONF=DIST VERSION=${{ env.RELEASE_VERSION }} | ||
- name: Create Release | ||
uses: softprops/action-gh-release@b7e450da2a4b4cb4bfbae528f788167786cfcedf | ||
with: | ||
draft: true | ||
prerelease: true | ||
name: PopTracker v${{ env.RELEASE_VERSION }} | ||
files: | | ||
dist/*.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |