Merge pull request #757 from emilazy/push-vwxvknzoyxvx #54
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
on: | ||
create: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
name: Draft Release | ||
jobs: | ||
draft_release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
continue-on-error: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
tag_name: ${{ steps.tag_name.outputs.tag_name }} | ||
version: ${{ steps.changelog.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get Tag Name | ||
id: tag_name | ||
run: echo ::set-output name=tag_name::${GITHUB_REF/refs\/tags\//} | ||
- name: Generate ChangeLog | ||
id: changelog | ||
run: util/output-changelog-md.sh >release.txt | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body_path: release.txt | ||
draft: true | ||
prerelease: false | ||
macosx: | ||
name: MacOS Release | ||
runs-on: macos-latest | ||
continue-on-error: false | ||
needs: draft_release | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install MacOS Dependencies | ||
run: brew update && brew install ffmpeg sfml libarchive curl | ||
- name: MacOS Package | ||
run: util/osx/create-pkg.sh ${{ github.ref }} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.draft_release.outputs.upload_url }} | ||
asset_path: ./attract-${{ github.ref }}.dmg | ||
asset_name: attract-${{ github.ref }}.dmg | ||
asset_content_type: application/zip |