release #1
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: release | |
on: | |
workflow_dispatch: | |
inputs: | |
release_version: | |
description: 'Which version are we releasing? (format vX.Y.Z)' | |
required: true | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: "release" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | |
with: | |
egress-policy: audit | |
- name: Checkout repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Configure github-actions[bot] | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Generate and Push Tags | |
run: | | |
version=${{ github.event.inputs.release_version }} | |
major=$(echo $version | cut -d. -f1) | |
minor=$(echo $version | cut -d. -f1-2) | |
git tag $version | |
git tag $minor -f | |
git tag $major -f | |
git push --set-upstream origin --tags -f | |
- name: Create GitHub release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run : | | |
gh release create "${{ github.event.inputs.release_version }}" --generate-notes | |
- name: Login to Docker Hub | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push Extension Image | |
run: | | |
version=${{ github.event.inputs.release_version }} | |
version_no_v=$(echo "$version" | cut -c2-) | |
make push-extension TAG=$version_no_v | |