-
Notifications
You must be signed in to change notification settings - Fork 16
62 lines (57 loc) · 1.56 KB
/
release-and-publish.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
name: Build, Release & Publish
on:
push:
branches:
- master
jobs:
build:
name: Checkout & Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
#
# ADD TEST/BUILD STEPS HERE
#
release:
name: Check version & Create release
runs-on: ubuntu-latest
needs: build
outputs:
released: ${{ steps.check.outputs.version }} # expose release.outputs.released for the "publish" job
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: EndBug/version-check@v1
id: check
with:
file-name: haxelib.json
diff-search: true
- name: Create Release
if: steps.check.outputs.changed
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.check.outputs.version }}
# tag_name: ${{ github.ref }}
release_name: ${{ steps.check.outputs.version }}
# release_name: ${{ github.ref }}
draft: false
prerelease: false
publish:
name: Publish to Haxelib
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.released
steps:
- uses: actions/checkout@v2
- uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.1.2
- run: |
zip colyseus.zip $(find src -name *.hx) tests hxml haxelib.json LICENSE README.md
haxe -version
haxelib submit colyseus.zip ${{ secrets.HAXELIB_PASSWORD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}