This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (56 loc) · 1.96 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
63
64
65
66
67
68
69
70
71
name: Create GitHub Release
on:
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Ensure Wally+NPM Version Numbers Match
run: |
NPM_VERSION=$( jq -r '.version' package.json )
WALLY_VERSION=$( grep -Po '(?<=version = ")([^"]+)' wally.toml )
if [ -z "$NPM_VERSION" ]; then
echo "NPM version not found in package.json"
exit 1
fi
if [ -z "$WALLY_VERSION" ]; then
echo "Wally version not found in wally.toml"
exit 1
fi
if [ "$WALLY_VERSION" != "$NPM_VERSION" ]; then
echo "Wally version ($WALLY_VERSION) does not match NPM version ($NPM_VERSION)"
exit 1
fi
- name: Setup Aftman
uses: ok-nick/[email protected]
- name: Report Tool Versions
run: aftman list
- name: Get Release Details
shell: bash
run: echo "PROJECT_VERSION=`grep -Po '(?<=version = ")([^"]+)' wally.toml`" >> $GITHUB_ENV
- name: Set Release Filename
shell: bash
run: |
echo "RELEASE_FILENAME=${{ github.event.repository.name }}-$PROJECT_VERSION.rbxm" >> $GITHUB_ENV
- name: Install Dependencies
run: wally install
- name: Remove Tests
run: find . -name "*.spec.lua" -delete
- name: Build Project
run: rojo build default.project.json -o $RELEASE_FILENAME
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_FILENAME }}
path: ${{ env.RELEASE_FILENAME }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.PROJECT_VERSION }}
tag_name: ${{ env.PROJECT_VERSION }}
fail_on_unmatched_files: true
files: |
${{ env.RELEASE_FILENAME }}
draft: true