[FEATURE] /* Description: */ Also moves all nodejs stuff into `tools` package. Also adds a basic `CONTRIBUTING.md` file. Superseeds https://github.com/Nomi-CEu/Nomi-CEu/pull/431, which was closed as the branch needed to be renamed, due to the last two items on this list. TODO: - [x] Make it only run on master repo. - [x] Remove qb-lang-revamp branch from the events - [x] Allow workflow to run on all branches starting with test_buildscript? /* Commits: */ * Buildscript Changes * Make Contributing Docs a .md file * updateqb.yml v1 * Test QB change * Add lang file to commit file list * Another Test Change * Test with only lang path, + `./` at beginning of path * Test QB change * updateqb.yml v3 * Test QB Change * Add some debug settings * Remove debug, branch input. Switch to auto-commit action * Make activate: branches prefix `test_buildscript`, commit author GHA bot * Add branch prefix note into CONTRIBUTING.md * Make workflow only run if on master repo
105 lines
2.8 KiB
Plaintext
105 lines
2.8 KiB
Plaintext
name: Nightly Builds
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
tags-ignore:
|
|
- '**'
|
|
|
|
jobs:
|
|
nightly:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Cancel previous runs
|
|
uses: styfle/cancel-workflow-action@0.8.0
|
|
with:
|
|
access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v2
|
|
- run: git fetch --prune --unshallow --tags --force
|
|
|
|
- name: Restore cached files
|
|
uses: actions/cache@v2
|
|
id: cache
|
|
with:
|
|
path: |
|
|
~/.npm
|
|
./.cache
|
|
./tools/node_modules
|
|
key: ${{ runner.os }}-bunny-${{ hashFiles('**/.cache', '**/package-lock.json', '**/manifest.json') }}
|
|
restore-keys: ${{ runner.os }}-bunny-
|
|
|
|
- name: "Setup NodeJS v16"
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: "16"
|
|
check-latest: true
|
|
|
|
- name: "Download NPM packages"
|
|
working-directory: ./tools
|
|
run: npm ci
|
|
|
|
- name: "Check environmental variables"
|
|
working-directory: ./tools
|
|
run: npx gulp check
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CURSEFORGE_PROJECT_ID: ${{ secrets.CURSEFORGE_PROJECT_ID }}
|
|
CURSEFORGE_API_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
|
|
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
|
|
|
- name: "Build everything"
|
|
working-directory: ./tools
|
|
run: npx gulp buildAll
|
|
env:
|
|
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
|
|
|
- name: "Prune cache"
|
|
working-directory: ./tools
|
|
run: npx gulp pruneCache
|
|
|
|
##
|
|
## Upload artifacts.
|
|
##
|
|
- name: "Make artifact names"
|
|
id: artifactNames
|
|
working-directory: ./tools
|
|
run: npx gulp makeArtifactNames
|
|
|
|
- name: "Upload client artifact"
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ steps.artifactNames.outputs.client }}
|
|
path: |
|
|
build/client/**/*
|
|
|
|
- name: "Upload server artifact"
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ steps.artifactNames.outputs.server }}
|
|
path: |
|
|
build/server/**/*
|
|
|
|
- name: "Upload lang artifact"
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ steps.artifactNames.outputs.lang }}
|
|
path: |
|
|
build/lang/**/*
|
|
|
|
- name: "Upload changelog artifact"
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changelog
|
|
path: |
|
|
build/shared/CHANGELOG.md
|
|
|
|
- name: "Fire Discord webhook"
|
|
working-directory: ./tools
|
|
run: npx gulp fireNightlyWebhook
|
|
env:
|
|
GITHUB_RUN_ID: ${{ github.run_id }}
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|