From b67091c10daafd10777b8d1b38a60addae11cfb8 Mon Sep 17 00:00:00 2001 From: Ostrzyciel Date: Wed, 19 Apr 2023 18:30:53 +0200 Subject: [PATCH] Add CI for releases --- .github/workflows/pre-release.yaml | 38 +++++++++++++++++++++++++++ .github/workflows/tagged-release.yaml | 34 ++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/pre-release.yaml create mode 100644 .github/workflows/tagged-release.yaml diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml new file mode 100644 index 0000000..8cea2e2 --- /dev/null +++ b/.github/workflows/pre-release.yaml @@ -0,0 +1,38 @@ +on: + push: + branches: + - main + workflow_dispatch: {} + +# TODO: doc gen & trigger doc update + +jobs: + pre-release: + name: "Make a pre-release" + runs-on: "ubuntu-latest" + container: ghcr.io/riverbench/ci-worker:main + permissions: write-all + steps: + - name: "Checkout repository" + uses: actions/checkout@v3 + with: + path: schema + + - name: "Package schema" + run: | + mkdir release + ci-worker package-schema dev schema release + + - name: Upload files for the release + uses: ncipollo/release-action@v1.12.0 + with: + allowUpdates: true + prerelease: true + draft: false + omitDraftDuringUpdate: false + makeLatest: false + tag: "dev" + name: "Development pre-release" + artifacts: 'release/*' + removeArtifacts: true + generateReleaseNotes: true diff --git a/.github/workflows/tagged-release.yaml b/.github/workflows/tagged-release.yaml new file mode 100644 index 0000000..f4c4a34 --- /dev/null +++ b/.github/workflows/tagged-release.yaml @@ -0,0 +1,34 @@ +on: + push: + tags: + - "v*" + +# TODO: doc gen & trigger doc update + +jobs: + tagged-release: + name: "Make a tagged release" + runs-on: "ubuntu-latest" + container: ghcr.io/riverbench/ci-worker:main + permissions: write-all + steps: + - name: "Checkout repository" + uses: actions/checkout@v3 + with: + path: schema + + - name: "Package schema" + run: | + mkdir release + ci-worker package-schema dev schema release + + - name: Upload files for the release + uses: ncipollo/release-action@v1.12.0 + with: + prerelease: false + draft: false + makeLatest: true + tag: "${{ env.GITHUB_REF_NAME }}" + name: "${{ env.GITHUB_REF_NAME }}" + artifacts: 'release/*' + generateReleaseNotes: true