version number #1
Workflow file for this run
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Release Build | |
permissions: write-all | |
env: | |
EXTENSION: ${{ vars.FORGE_EXTENSION }} | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo Assets | |
uses: actions/checkout@v4 | |
- name: Zip Assets Into ${{ env.EXTENSION }} File | |
uses: thedoctor0/zip-release@0.7.6 | |
with: | |
filename: ${{ github.event.repository.name }}${{ env.EXTENSION }} | |
exclusions: '*.git* /*node_modules/* .editorconfig body.md *.psd *.xcf forge-thumbnail.png thumbnail.png *.toml' | |
- name: Add ${{ env.EXTENSION }} File to Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ${{ github.event.repository.name }}${{ env.EXTENSION }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}${{ env.EXTENSION }} | |
path: ${{ github.event.repository.name }}${{ env.EXTENSION }} | |
upload: | |
name: Upload to Forge | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ vars.FORGE_ITEM_ID != '' }} | |
env: | |
IS_PRERELEASE: ${{ contains(github.ref_name,'-rc') }} && ${{ contains(github.ref_name,'-beta') }} | |
steps: | |
- name: Checkout FG-Forge-Updater repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 'bmos/FG-Forge-Updater' | |
- name: Set up python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: 'pip' | |
- name: Install general project dependencies | |
run: | | |
pip install -U pip | |
pip install . | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}${{ env.EXTENSION }} | |
- name: Upload ${{ env.EXTENSION }} file to live channel | |
id: upload-live | |
if: ${{ env.IS_PRERELEASE == 'false && false' }} | |
env: | |
FG_ITEM_ID: ${{ vars.FORGE_ITEM_ID }} | |
FG_USER_NAME: ${{ vars.FORGE_USER_NAME }} | |
FG_USER_PASS: ${{ secrets.FORGE_USER_PASS }} | |
FG_UL_FILE: ${{ github.event.repository.name }}${{ env.EXTENSION }} | |
FG_RELEASE_CHANNEL: Live | |
run: | | |
python src/main.py | |
- name: Upload ${{ env.EXTENSION }} file to test channel | |
id: upload-test | |
if: ${{ env.IS_PRERELEASE != 'false && false' }} | |
env: | |
FG_ITEM_ID: ${{ vars.FORGE_ITEM_ID }} | |
FG_USER_NAME: ${{ vars.FORGE_USER_NAME }} | |
FG_USER_PASS: ${{ secrets.FORGE_USER_PASS }} | |
FG_UL_FILE: ${{ github.event.repository.name }}${{ env.EXTENSION }} | |
FG_RELEASE_CHANNEL: Test | |
run: | | |
python src/main.py |