Skip to content

Create new release

Create new release #1

Workflow file for this run

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
create-release:
name: Create release
runs-on: ubuntu-latest
needs: [build-docker-image]
steps:
- name: Create release
uses: softprops/action-gh-release@v1
with:
# create a draft release which needs manual approval
draft: true