Skip to content

chore: add/update default repository files (#181) #200

chore: add/update default repository files (#181)

chore: add/update default repository files (#181) #200

---
# GitHub Actions workflow for automated release management
# Creates release PRs and GitHub releases when changes are pushed to main
# https://github.com/googleapis/release-please
# https://danielscholl-osdu.github.io/osdu-fork-template/workflows/release/
name: release-please
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-24.04-arm
steps:
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
id: release
with:
release-type: simple
- name: Checkout repository
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
env:
MAJOR: ${{ steps.release.outputs.major }}
MINOR: ${{ steps.release.outputs.minor }}
run: |
set -euxo pipefail
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Get the current commit SHA
SHA=$(git rev-parse HEAD)
echo "🏷️ Tag commit: ${SHA}"
echo "🔍 Major: ${MAJOR}"
echo "🔍 Minor: ${MINOR}"
echo "🚀 Release tag: v${MAJOR}.${MINOR}"
git tag -f "v${MAJOR}" "${SHA}"
git tag -f "v${MAJOR}.${MINOR}" "${SHA}"
# Push tags to remote
git push --force origin "v${MAJOR}"
git push --force origin "v${MAJOR}.${MINOR}"