Skip to content

Commit

Permalink
add release runner
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver committed Apr 17, 2021
1 parent d115c63 commit 07667e9
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release.yaml
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 }}

0 comments on commit 07667e9

Please sign in to comment.