-
Notifications
You must be signed in to change notification settings - Fork 115
62 lines (54 loc) · 1.73 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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