Skip to content

Commit 97344b5

Browse files
authored
Draft Release Workflow (#4)
Added a GitHub workflow that will automatically draft a release when a tag is added
1 parent 748a1a5 commit 97344b5

File tree

1 file changed

+39
-11
lines changed

1 file changed

+39
-11
lines changed

.github/workflows/LuaWatcom.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: push
44

55
jobs:
66
Watcom:
7-
name: Lua for Watcom
7+
name: Build Lua with Open Watcom
88
runs-on: ubuntu-latest
99

1010
steps:
@@ -64,27 +64,55 @@ jobs:
6464
run: |
6565
unix2dos *.lua
6666
67-
- name: Create 160k Floppy Diskette Image
67+
- name: Create Binaries Zip
6868
run: |
69-
mformat -C -i dist/Lua5DD8.ima -v LUA -f 160
70-
mcopy -i dist/Lua5DD8.ima dist/bin/lua16.exe example.lua ::
69+
zip -j9 --DOS-names "dist/Lua Exe.zip" dist/bin/*.exe example.lua
7170
72-
- name: Create 1.4M Floppy Diskette Image
71+
- name: Create 160k 16-bit DOS Floppy Diskette Image
7372
run: |
74-
mformat -C -i dist/Lua3HD18.ima -v LUA -f 1440
75-
mcopy -i dist/Lua3HD18.ima dist/bin/*.exe example.lua ::
73+
mformat -C -i dist/Lua160k.ima -v "LUA DOS" -f 160
74+
mcopy -i dist/Lua160k.ima dist/bin/lua16.exe example.lua ::
7675
77-
- name: Create Zip Binaries
76+
- name: Create 1.4M Multi-Platform Floppy Diskette Image
7877
run: |
79-
zip -j9 --DOS-names "dist/Lua DOS Bin.zip" dist/bin/*.exe example.lua
78+
mformat -C -i dist/LuaMulti.ima -v "LUA MULTIOS" -f 1440
79+
mcopy -i dist/LuaMulti.ima dist/bin/*.exe example.lua ::
8080
81-
- name: Zip Disk Images
81+
- name: Create Floppy Disk Images Zip
8282
run: |
83-
zip -j9 --DOS-names "dist/Lua DOS Ima.zip" dist/*.ima
83+
zip -j9 --DOS-names "dist/Lua Ima.zip" dist/*.ima
8484
8585
- name: Upload Artifacts
8686
uses: actions/upload-artifact@v4
8787
with:
8888
name: 'Lua Binaries'
8989
path: dist/*.zip
9090
compression-level: 0
91+
92+
Draft:
93+
name: Draft Release
94+
needs: Watcom
95+
runs-on: ubuntu-latest
96+
if: startsWith(github.ref, 'refs/tags/202')
97+
98+
permissions:
99+
contents: write
100+
actions: read
101+
102+
steps:
103+
- uses: actions/checkout@v4
104+
105+
- name: Download Artifacts
106+
uses: actions/download-artifact@v4
107+
108+
- name: Create Draft Release
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
run: |
112+
TAG_NAME="${GITHUB_REF#refs/tags/}" # Extract the tag name
113+
gh release create "$TAG_NAME" \
114+
--draft \
115+
--title "$TAG_NAME" \
116+
--notes "Lua for Watcom builds from $TAG_NAME" \
117+
"Lua Binaries/Lua Exe.zip#Lua Exe.zip" \
118+
"Lua Binaries/Lua Ima.zip#Lua Ima.zip"

0 commit comments

Comments
 (0)