chore: update deps + refactoring #1163
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/setup | |
- run: npm run build | |
# @template-customization-start | |
- name: If publishing, upload mod output | |
if: "contains(github.event.head_commit.message, 'chore: release') && needs.pr-check.outputs.number != 'null'" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mod-directory | |
path: ./mod | |
# @template-customization-end | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/setup | |
- run: npm run lint | |
# @template-customization-start | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build, lint] | |
if: "contains(github.event.head_commit.message, 'chore: release') && needs.pr-check.outputs.number != 'null'" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/setup | |
- name: Download mod output | |
uses: actions/download-artifact@v3 | |
with: | |
name: mod-directory | |
path: ./mod | |
- name: Upload the mod to Steam Workshop (if this is a release commit) | |
uses: IsaacScript/isaac-steam-workshop-upload@v2 | |
with: | |
mod_path: mod | |
change_note: "Version: {VERSION}\n\nChanges for this mod are [url=https://github.com/Zamiell/babies-mod]tracked on GitHub[/url]." | |
env: | |
CONFIG_VDF_CONTENTS: ${{ secrets.CONFIG_VDF_CONTENTS }} | |
discord: | |
name: Discord Failure Notification | |
needs: [build, lint, publish] | |
if: always() # This is needed to always run this job, even if the other jobs fail. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v3 | |
- if: env.WORKFLOW_CONCLUSION != 'success' && env.WORKFLOW_CONCLUSION != 'cancelled' | |
uses: sarisia/actions-status-discord@v1 | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
status: ${{ env.WORKFLOW_CONCLUSION }} | |
title: "" | |
# @template-customization-end |