-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (74 loc) · 3 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
72
73
74
75
76
name: Release
on: [workflow_dispatch]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install NodeJS
uses: actions/setup-node@master
with:
node-version: 12.16.2
registry-url: 'https://registry.npmjs.org'
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: install roblox-ts
run: npm i -g roblox-ts
- name: install local npm packages
run: npm i --production=false
- name: publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: clean-up package output
run: rm -rf ./out
- name: compile typescript code for model
run: rbxtsc --type=model --rojo=./standalone-model.project.json
- name: install foreman
uses: rojo-rbx/setup-foreman@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: install foreman packages (rojo, run-in-roblox)
run: foreman install
- name: run rojo build
run: rojo build -o ./package-name-${{ steps.package-version.outputs.current-version }}.rbxmx ./standalone-model.project.json
- name: create-release
uses: actions/create-release@latest
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.package-version.outputs.current-version }}
tag_name: ${{ steps.package-version.outputs.current-version }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload rbxmx file to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./package-name-${{ steps.package-version.outputs.current-version }}.rbxmx
asset_name: package-name-${{ steps.package-version.outputs.current-version }}.rbxmx
asset_content_type: form
- name: upload rbxmx file to Roblox
run: |
cd ./scripts
python upload_model.py -a ${{ secrets.ASSET_ID }} -f ../package-name-${{ steps.package-version.outputs.current-version }}.rbxmx -r "${{ secrets.UPLOADER_BOT_ROBLOSECURITY }}"
cd ..
- name: prepare wally package contents
run: |
mkdir -p ~/temp/package-name
cp -r ./{include,out} ~/temp/package-name/
cp ./{CHANGELOG.md,LICENSE,README.md,wally.lock,wally.toml} ~/temp/package-name/
cp ./standalone-model.project.json ~/temp/package-name/default.project.json
mkdir ~/temp/package-name/node_modules
cp -r ./node_modules/@rbxts ~/temp/package-name/node_modules/
- name: prepare wally auth
run: |
mkdir ~/.wally
echo -e '${{ secrets.WALLY_AUTH }}' > ~/.wally/auth.toml
- name: publish wally package
run: wally publish --project-path ~/temp/package-name/