Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create additional tag on release for google-cloud-shared-dependencies #1692

Merged
merged 17 commits into from
May 22, 2023
Merged
36 changes: 36 additions & 0 deletions .github/workflows/create_additional_release_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Create additional tags for each release

on:
release:
types: [published]
workflow_dispatch: # If manually triggered, clarify which release to create the additional tags for
inputs:
releaseTag:
description: 'Release Tag'
required: true

jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.releaseTag }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

- name: Create additional tags
run: |
ARTIFACT_IDS=('google-cloud-shared-dependencies' 'api-common' 'gax')
for ARTIFACT_ID in "${ARTIFACT_IDS[@]}"
do
VERSION=$(grep "${ARTIFACT_ID}" versions.txt | cut -d':' -f2)
git tag ${ARTIFACT_ID}/$VERSION ${{ github.event.inputs.releaseTag }}
git push origin ${ARTIFACT_ID}/$VERSION
done