-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release workflow for the restate repository
The release workflow will be triggered by pushing a version tag. It will then build a docker file for this version, the binaries of the CLI and finally creates a release with the binaries attached. This fixes #347.
- Loading branch information
1 parent
b3c42b1
commit 1946d75
Showing
5 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ name: CI | |
|
||
on: | ||
pull_request: | ||
workflow_call: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
name: Build Docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- v** | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Create new release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v** | ||
|
||
jobs: | ||
run-tests: | ||
name: Test release | ||
uses: ./.github/workflows/ci.yml | ||
|
||
build-docker-image: | ||
name: Build release Docker image | ||
needs: [run-tests] | ||
uses: ./.github/workflows/docker.yml | ||
|
||
build-cli-binaries: | ||
name: Build release cli binaries | ||
needs: [run-tests] | ||
uses: ./.github/workflows/cli.yml | ||
|
||
create-release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
needs: [build-docker-image, build-cli-binaries] | ||
|
||
steps: | ||
- name: Download cli binaries | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Package cli binaries | ||
id: package-cli-binaries | ||
run: | | ||
for cli in restate-cli-*; do zip -j ${cli}.zip ${cli}/restate-cli; done | ||
echo "PACKAGES<<EOF" >> $GITHUB_OUTPUT | ||
ls -1 restate-cli-*.zip >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
# create a draft release which needs manual approval | ||
draft: true | ||
files: ${{ steps.package-cli-binaries.outputs.PACKAGES }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Releasing the Restate runtime | ||
|
||
In order to release the Restate runtime, you have to create a tag of the form `vX.Y.Z` and push it to the repository. | ||
The tag will trigger the [release.yml](/.github/workflows/release.yml) workflow which does the following: | ||
|
||
* Running the local tests | ||
* Creating and pushing the Docker image with the runtime | ||
* Creating the CLI binaries | ||
* Creating a draft release with the CLI binaries attached | ||
|
||
In order to finish the release, you have to publish it [here](https://github.com/restatedev/restate/releases). |