-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (48 loc) · 1.48 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
name: Release
on:
pull_request:
release:
types: [published]
push:
branches:
- main
jobs:
publish-github-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: Roblox/setup-foreman@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get model file name
run: |
name=$(jq -r .name default.project.json)
echo "MODEL_FILE=$name.rbxm" >> $GITHUB_ENV
- name: Install packages
run: lune run wally-install
- name: Build
run: lune run build -- --target prod --output ${{ env.MODEL_FILE }}
- uses: softprops/action-gh-release@v1
if: ${{ github.event.release }}
with:
files: ${{ env.MODEL_FILE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-plugin:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: Roblox/setup-foreman@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install packages
run: lune run wally-install
- name: Publish nightly build to Creator Store
if: github.ref == 'refs/heads/main'
run: lune run publish-plugin -- --target dev --apiKey ${{ secrets.ROBLOX_API_KEY }}
- name: Publish release to Creator Store
if: github.event.release
run: lune run publish-plugin -- --target prod --apiKey ${{ secrets.ROBLOX_API_KEY }}