From 85543cc8a876726c61a6bddef2e669c138351d0e Mon Sep 17 00:00:00 2001 From: ktong Date: Sat, 3 Feb 2024 13:06:40 -0800 Subject: [PATCH] tag submodules --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..23e074e4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + tag: + strategy: + matrix: + module: [ 'provider/file', 'provider/pflag' ] + name: Tag 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 + })