Skip to content

feat: Create cloud_kms module #10

feat: Create cloud_kms module

feat: Create cloud_kms module #10

Workflow file for this run

name: Release
on:
push:
branches: [master]
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Authenticate bot
id: auth
uses: getsentry/action-github-app-token@v3
with:
app_id: ${{ secrets.DEVOPS_BOT_APP_ID }}
private_key: ${{ secrets.DEVOPS_BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 21
- name: Release semantic version
env:
GITHUB_TOKEN: ${{ steps.auth.outputs.token }}
run: npx semantic-release
- name: Release major version
env:
GITHUB_USER: ${{ secrets.DEVOPS_BOT_GIT_USER }}
GITHUB_EMAIL: ${{ secrets.DEVOPS_BOT_GIT_EMAIL }}
run: |
VERSION="$(git tag --points-at ${{ github.sha }})"
if [ -z $VERSION ]; then
echo "No major version to publish" >> $GITHUB_STEP_SUMMARY
else
MAJOR_VERSION="$(cut -d '.' -f 1 <<< "$VERSION")"
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_EMAIL}"
git tag -fa ${MAJOR_VERSION} -m "Map ${MAJOR_VERSION} to ${VERSION}"
git push origin ${MAJOR_VERSION} --force
echo "Successfully published semantic version \`$VERSION\` and major version \`$MAJOR_VERSION\`" >> $GITHUB_STEP_SUMMARY
fi
notify:
needs: [release]
name: Notify
if: always()
runs-on: ubuntu-latest
steps:
- uses: andrewscwei/telegram-action@v1
with:
success: ${{ needs.release.result == 'success' }}
cancelled: ${{ needs.release.result == 'cancelled' }}
bot-token: ${{ secrets.TELEGRAM_DEVOPS_BOT_TOKEN }}
chat-id: ${{ secrets.TELEGRAM_DEVOPS_CHAT_ID }}