76 lines
2.1 KiB
YAML
76 lines
2.1 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
|
|
run: node scripts/updateManifest.mjs
|
|
env:
|
|
# TODO: determine fully qualified URLs
|
|
DOWNLOAD_URL: "${{FORGEJO_SERVER_URL}}/${{FORGEJO_REPOSITORY}}/releases/"
|
|
LATEST_URL: "${{FORGEJO_SERVER_URL}}/${{FORGEJO_REPOSITORY}}/releases/"
|
|
|
|
- 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
|
|
run: node scripts/updateManifest.mjs
|
|
env:
|
|
# TODO: determine fully qualified URLs
|
|
DOWNLOAD_URL: "https://github.com/${{vars.GH_USER}}/${{vars.GH_REPO}}/releases"
|
|
LATEST_URL: "https://github.com/${{vars.GH_USER}}/${{vars.GH_REPO}}/releases"
|
|
|
|
- name: Create draft release
|