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
33 changes: 33 additions & 0 deletions .github/workflows/create_shared_dependencies_release_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Create additional tag for each release with google-cloud-shared-dependencies version
alicejli marked this conversation as resolved.
Show resolved Hide resolved

on:
release:
types: [published]
workflow_dispatch: # If manually triggered, clarify which release to create the additional tag 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 tag
run: |
ARTIFACT_ID='google-cloud-shared-dependencies'
alicejli marked this conversation as resolved.
Show resolved Hide resolved
VERSION=$(grep "${ARTIFACT_ID}" versions.txt | cut -d':' -f2)
git tag google-cloud-shared-dependencies/v$VERSION ${{ github.event.inputs.releaseTag }}
git push origin google-cloud-shared-dependencies/v$VERSION