-
-
Notifications
You must be signed in to change notification settings - Fork 55
42 lines (35 loc) · 1.73 KB
/
Copy pathpublish.yml
File metadata and controls
42 lines (35 loc) · 1.73 KB
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
name: publish-release
on:
# Only run this workflow manually
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-22.04
environment: cncnet
steps:
# Checkout the repo
- name: Checkout repo
uses: actions/checkout@v3
# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
# Restore Tools NPM Libs from Cache
- name: Restore Tools NPM Libs from Cache
id: npm-cache
uses: actions/cache@v4
with:
path: tools/node_modules
key: ${{ runner.os }}-node-tools-prod-${{ hashFiles('tools/package-lock.json', 'tools/package.json') }}
restore-keys: ${{ runner.os }}-node-tools-prod-
- name: Install Tools NPM Libs
if: steps.npm-cache.outputs.cache-hit != 'true'
working-directory: tools
run: npm ci --omit=dev
# This looks for the latest release in our repo and does the following:
# - updates our /live mirror path to point to it
# - posts an update message to an IRC channel notifying user clients of the newly published update
- name: Publish Latest Release
working-directory: tools
run: npm run publish-release -- --token ${{ secrets.GITHUB_TOKEN }} --sshHost ${{ secrets.SSH_HOST }} --sshUsername ${{ secrets.SSH_USER }} --sshPort ${{ secrets.SSH_PORT }} --sshPassphrase ${{ secrets.SSH_PASS }} --sshKeyBase64 ${{ secrets.SSH_KEY_BASE64 }} --yrGamePath ${{ secrets.SSH_PATH_GAMES_YR }} --ircServer ${{ secrets.IRC_SERVER }} --ircChannel ${{ secrets.IRC_CHANNEL }} --ircNick ${{ secrets.IRC_NICK }} --ircUserName ${{ secrets.IRC_USERNAME }} --ircPassword ${{ secrets.IRC_PASSWORD }} --ircRealName ${{ secrets.IRC_REALNAME }}