From 2f7a808df2e638baca622a4476e1117f32f6aaeb Mon Sep 17 00:00:00 2001 From: ktong Date: Sat, 3 Feb 2024 13:06:40 -0800 Subject: [PATCH] tag submodules --- .github/workflows/tag.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 00000000..b11b3cc1 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,27 @@ +name: Tag +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + tag: + strategy: + matrix: + module: [ 'provider/file', 'provider/pflag' ] + name: Submodules + runs-on: ubuntu-latest + steps: + - name: Create tag + uses: actions/github-script@v7 + with: + script: | + ref = "refs/tags/${{ matrix.module }}/" + context.ref.split('/')[2] + github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: ref, + sha: context.sha + })