on: [ workflow_dispatch ] jobs: create-artifacts: runs-on: act steps: - name: Checkout code uses: actions/checkout@v4 - name: Install dependencies run: npm clean-install - 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 - id: version run: cat system.json | echo version=`jq -r ".version"` >> "$FORGEJO_OUTPUT" - name: Update manifest run: node scripts/updateManifest.mjs env: DOWNLOAD_URL: "${{FORGEJO_SERVER_URL}}/${{FORGEJO_REPOSITORY}}/releases/download/${{steps.version.output.version}}/release.zip" LATEST_URL: "${{FORGEJO_SERVER_URL}}/${{FORGEJO_REPOSITORY}}releases/download/latest/system.json" - name: Create draft release run: cat system.json 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 - id: version run: cat system.json | echo version=`jq -r ".version"` >> "$FORGEJO_OUTPUT" - name: Update manifest run: node scripts/updateManifest.mjs env: DOWNLOAD_URL: "https://github.com/${{vars.GH_USER}}/${{vars.GH_REPO}}/releases/download/${{steps.version.output.version}}/release.zip" LATEST_URL: "https://github.com/${{vars.GH_USER}}/${{vars.GH_REPO}}/releases/latest/download/system.json" - name: Sync Github mirror run: echo Syncing mirror - name: Create draft release run: cat system.json