Skip to content

Cleanup CI

Cleanup CI #50

Workflow file for this run

name: SIT Server Mod CI/CD
on:
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.11.1'
- name: Install dependencies
run: |
npm clean-install
- name: Check env
run: npx tsc --showConfig && tree .
- name: Build
run: npm run build
- name: Read package.json
id: read_package_json
run: echo "::set-output name=version::$(node -e 'console.log(require("./package.json").version)')"
- name: Log Build Status
run: |
if [ ${{ job.status }} == 'success' ]; then
echo "Build was successful!"
else
echo "Build failed!"
fi
if: github.event_name != 'workflow_dispatch'
- name: Compress SITCoop folder
run: zip -r SITCoop.zip ./SITCoop
if: github.event_name == 'workflow_dispatch'
- name: Create release
uses: softprops/action-gh-release@v1
if: github.event_name == 'workflow_dispatch'
with:
tag_name: ${{ steps.read_package_json.outputs.version }}
name: SITCoop-${{ steps.read_package_json.outputs.version }}
files: SITCoop.zip
generate_release_notes: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}