-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (53 loc) · 1.75 KB
/
yue_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
name: Create Yuescript Release
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Change directory
run: cd $GITHUB_WORKSPACE
- name: Remove unused files and folders
run: |
rm .gitignore
rm -rf .github
- name: Create VERSION file
run: echo -e ${{ github.ref_name }} > VERSION
- name: Download Yuescript and unzip yue
run: |
wget https://github.com/pigpigyyy/Yuescript/releases/download/v0.23.6/yue-linux-x86_64.zip
unzip yue-linux-x86_64.zip
rm yue-linux-x86_64.zip
- name: Build .lua and remove .yue
run: |
./yue ./
rm yue
find . -type f -name '*.yue' -delete
- name: Push to lua branch
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Release build: $(cat VERSION)"
git push -f origin HEAD:lua
- name: Remove .git dir
run: rm -rf .git
- name: Create subdirectory
run: mkdir ${{ github.event.repository.name }}
- name: Move files into sub directory
run: ls | grep -v ${{ github.event.repository.name }} | xargs mv -t ${{ github.event.repository.name }}
- name: Create Release Asset
run: zip -r9 ${{ github.event.repository.name }}.zip .
- name: Publish Release
uses: softprops/action-gh-release@v1
id: create_release
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: |
./${{ github.event.repository.name }}.zip