diff --git a/.forgejo/workflows/draft-release.yaml b/.forgejo/workflows/draft-release.yaml new file mode 100644 index 0000000..68c3150 --- /dev/null +++ b/.forgejo/workflows/draft-release.yaml @@ -0,0 +1,63 @@ +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: node scripts/buildCompendia.mjs + + - 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 diff --git a/scripts/tagExists.mjs b/scripts/tagExists.mjs new file mode 100644 index 0000000..2a266b5 --- /dev/null +++ b/scripts/tagExists.mjs @@ -0,0 +1,11 @@ +const { + TAG_NAME, + FORGEJO_API_URL, + FORGEJO_REPOSITORY, + FORGEJO_REPOSITORY_OWNER, +} = process.env; + + +console.log(process.env) + +process.exit(1);