Skip to content

chore: release main (#87) #51

chore: release main (#87)

chore: release main (#87) #51

Workflow file for this run

name: Release
on:
push:
branches:
- main
paths:
- "disallow-same-approver/*"
- "optimize-apt-get/*"
- "verify-created-release/*"
- "delete-release/*"
- "ecs-update-and-deploy-task-definition/*"
- "setup-boilerplate/*"
- "setup-ok/*"
jobs:
release-please:
name: Run release-please
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Run Release Please
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
id: r
- if: ${{ steps.r.outputs.releases_created }}
name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- if: ${{ steps.r.outputs.releases_created }}
name: Import okctl-bot GPG key
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # 6.1.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY_FOR_MACHINE_USER }}
passphrase: ${{ secrets.GPG_PASSPHRASE_FOR_MACHINE_USER }}
# Username and email is inferred from GPG key metadata
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- if: ${{ steps.r.outputs.disallow-same-approver--release_created }}
name: "[Release: disallow-same-approver] Tag major and minor versions"
env:
COMPONENT: disallow-same-approver
MAJOR: ${{ steps.r.outputs.disallow-same-approver--major }}
MINOR: ${{ steps.r.outputs.disallow-same-approver--minor }}
run: |
tags=("${COMPONENT}-v${MAJOR}" "${COMPONENT}-v${MAJOR}.${MINOR}")
for tag in "${tags[@]}"; do
# Delete old tag
git tag -d "${tag}" || true
# Push the tag deletion
git push origin :"${tag}" || true
# Add new tag
git tag -s -a "${tag}" -m "Release ${tag}"
# Push new tag
git push origin "${tag}"
done
- if: ${{ steps.r.outputs.optimize-apt-get--release_created }}
name: "[Release: optimize-apt-get] Tag major and minor versions"
env:
COMPONENT: optimize-apt-get
MAJOR: ${{ steps.r.outputs.optimize-apt-get--major }}
MINOR: ${{ steps.r.outputs.optimize-apt-get--minor }}
run: |
tags=("${COMPONENT}-v${MAJOR}" "${COMPONENT}-v${MAJOR}.${MINOR}")
for tag in "${tags[@]}"; do
# Delete old tag
git tag -d "${tag}" || true
# Push the tag deletion
git push origin :"${tag}" || true
# Add new tag
git tag -s -a "${tag}" -m "Release ${tag}"
# Push new tag
git push origin "${tag}"
done
- if: ${{ steps.r.outputs.delete-release--release_created }}
name: "[Release: delete-release] Tag major and minor versions"
env:
COMPONENT: delete-release
MAJOR: ${{ steps.r.outputs.delete-release--major }}
MINOR: ${{ steps.r.outputs.delete-release--minor }}
run: |
tags=("${COMPONENT}-v${MAJOR}" "${COMPONENT}-v${MAJOR}.${MINOR}")
for tag in "${tags[@]}"; do
# Delete old tag
git tag -d "${tag}" || true
# Push the tag deletion
git push origin :"${tag}" || true
# Add new tag
git tag -s -a "${tag}" -m "Release ${tag}"
# Push new tag
git push origin "${tag}"
done
- if: ${{ steps.r.outputs.verify-created-release--release_created }}
name: "[Release: verify-created-release] Tag major and minor versions"
env:
COMPONENT: verify-created-release
MAJOR: ${{ steps.r.outputs.verify-created-release--major }}
MINOR: ${{ steps.r.outputs.verify-created-release--minor }}
run: |
tags=("${COMPONENT}-v${MAJOR}" "${COMPONENT}-v${MAJOR}.${MINOR}")
for tag in "${tags[@]}"; do
# Delete old tag
git tag -d "${tag}" || true
# Push the tag deletion
git push origin :"${tag}" || true
# Add new tag
git tag -s -a "${tag}" -m "Release ${tag}"
# Push new tag
git push origin "${tag}"
done