66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
on: [ workflow_dispatch ]
|
|
jobs:
|
|
create-artifacts:
|
|
runs-on: act
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Extract version from manifest
|
|
id: version
|
|
run: cat system.json | echo version=`jq -r ".version"` >> "$FORGEJO_OUTPUT"
|
|
|
|
- name: Assert that the tag doesn't exist
|
|
run: node scripts/tagExists.mjs
|
|
env:
|
|
TAG_NAME: ${{steps.version.output.version}}
|
|
|
|
- name: Build compendia
|
|
run: "npm run data:build"
|
|
|
|
- name: Remove compendia source
|
|
run: "rm -rf packs/**/_source"
|
|
|
|
- name: Compress files
|
|
run: zip -r release.zip langs module styles templates README.md assets
|
|
|
|
- name: Upload artifacts
|
|
uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
path: |
|
|
system.json
|
|
release.zip
|
|
retention-days: 7
|
|
if-no-files-found: error
|
|
|
|
|
|
forgejo-release:
|
|
runs-on: docker
|
|
needs:
|
|
- create-artifacts
|
|
if: var.RELEASE_TO_FORGEJO
|
|
steps:
|
|
- name: download artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
merge-multiple: true
|
|
|
|
- name: update manifest
|
|
|
|
- name: create draft release
|
|
|
|
|
|
github-release:
|
|
runs-on: docker
|
|
needs:
|
|
- create-artifacts
|
|
if: var.RELEASE_TO_GITHUB
|
|
steps:
|
|
- name: download artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
merge-multiple: true
|
|
|
|
- name: update manifest
|
|
|
|
- name: create draft release
|