Create new release #2
Workflow file for this run
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
name: Create new release | |
on: | |
push: | |
tags: | |
- v** | |
jobs: | |
verify-version: | |
name: Verify version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install dasel | |
run: | | |
wget -q https://github.com/TomWright/dasel/releases/download/v2.3.1/dasel_linux_amd64 && \ | |
mv dasel_linux_amd64 dasel && \ | |
chmod +x dasel && \ | |
./dasel --version | |
- name: Verify version | |
run: | | |
# write yaml to remove quotes | |
version=$(./dasel --file Cargo.toml --read toml 'workspace.package.version' --write yaml) | |
tag_version=${{ github.ref_name }} | |
tag_version=${tag_version#v} | |
if [ ${tag_version} != ${version} ]; then | |
echo "::error file=release.yml,line=28::Cargo.toml version '${version}' is not equal to tag version '${tag_version}'. Please align them." | |
exit 1; | |
fi | |
run-tests: | |
name: Test release | |
needs: [verify-version] | |
uses: ./.github/workflows/ci.yml | |
secrets: inherit | |
build-docker-image: | |
name: Build release Docker image | |
needs: [run-tests] | |
uses: ./.github/workflows/docker.yml | |
secrets: inherit | |
with: | |
pushToDockerHub: true | |
build-binaries: | |
name: Build binaries | |
needs: [ run-tests ] | |
uses: ./.github/workflows/binaries.yml | |
secrets: inherit | |
with: | |
npmVersion: ${{ github.ref_name }} | |
create-release: | |
name: Create release | |
runs-on: ubuntu-latest | |
needs: [build-docker-image, build-binaries] | |
steps: | |
- name: Download aarch64-apple-darwin binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: restate.aarch64-apple-darwin.tar.gz | |
- name: Download x86_64-apple-darwin binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: restate.x86_64-apple-darwin.tar.gz | |
- name: Download x86_64-unknown-linux-musl binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: restate.x86_64-unknown-linux-musl.tar.gz | |
- name: Download aarch64-unknown-linux-musl binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: restate.aarch64-unknown-linux-musl.tar.gz | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
# create a draft release which needs manual approval | |
draft: true | |
files: | | |
restate.aarch64-apple-darwin.tar.gz | |
restate.x86_64-apple-darwin.tar.gz | |
restate.x86_64-unknown-linux-musl.tar.gz | |
restate.aarch64-unknown-linux-musl.tar.gz | |