-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GH CLI for releasing instead of unmaintained package
- Loading branch information
Showing
1 changed file
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,24 +9,33 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install Lua | ||
uses: leafo/gh-actions-lua@v10 | ||
|
||
- name: Install LuaRocks | ||
uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- run: luarocks install dkjson | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Create .env file | ||
run: | | ||
touch .env | ||
echo LUAROCKS_API_KEY=${{ secrets.LUAROCKS_API_KEY }} >> .env | ||
- name: Publish the rock | ||
run: npm run ci:publish | ||
|
||
- name: Install Luvit | ||
run: curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh | ||
|
||
- name: Make lit and luvit available and executable | ||
run: | | ||
sudo cp lit /usr/local/bin/lit | ||
|
@@ -35,10 +44,13 @@ jobs: | |
sudo chmod +x /usr/local/bin/luvit | ||
sudo cp luvi /usr/local/bin/luvi | ||
sudo chmod +x /usr/local/bin/luvi | ||
- name: Build the Lit binary | ||
run: npm run build:lit | ||
|
||
- name: Rename the Lit binary | ||
run: mv ./dist/jestronaut ./dist/jestronaut-ubuntu | ||
|
||
- name: Upload binary artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -49,18 +61,24 @@ jobs: | |
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install Luvit | ||
shell: pwsh | ||
run: "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/master/get-lit.ps1'))" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build the Lit binary | ||
run: npm run build:lit | ||
|
||
- name: Rename the Lit binary | ||
run: mv ./dist/jestronaut.exe ./dist/jestronaut-windows.exe | ||
|
||
- name: Upload binary artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -71,13 +89,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build the GMod addon | ||
run: npm run build:gmod | ||
|
||
- name: Upload GMod addon artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -91,26 +113,36 @@ jobs: | |
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Create dist directory | ||
run: mkdir -p dist | ||
|
||
- name: Download binary artifact from publish_rock_and_build_ubuntu | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: jestronaut-ubuntu | ||
path: dist | ||
|
||
- name: Download binary artifact from build_windows | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: jestronaut-windows | ||
path: dist | ||
|
||
- name: Install GitHub CLI | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gh | ||
- name: Authenticate GitHub CLI | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
|
||
- name: Create a new release | ||
uses: "marvinpinto/[email protected]" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Latest (automatic build)" | ||
files: | | ||
dist/jestronaut-ubuntu | ||
dist/jestronaut-windows.exe | ||
id: create_release | ||
run: | | ||
gh release create latest \ | ||
--prerelease \ | ||
--title "Latest (automatic build)" \ | ||
dist/jestronaut-ubuntu \ | ||
dist/jestronaut-windows.exe \ | ||
dist/gmod-addon.zip |