Skip to content

Commit

Permalink
[#120] actions/github-script@v7: add submodule tags automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
machernyavskiy committed Mar 5, 2024
1 parent d3164ec commit 50f4f3e
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Print tag
- name: Print ref name
run: |
echo "${{ github.ref }}"
echo "${{ github.ref_name }}"
- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -30,4 +30,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- name: Set submodule tags
uses: actions/github-script@v7
with:
script: |
const creator = github.ref_name
let submodules: string[] = ['stdlib', 'pgx', 'sqlx', 'gorm'];
for (const submodule of submodules) {
echo 'refs/tags/${{ ref_name }}'
}
# github.rest.git.createRef({
# owner: context.repo.owner,
# repo: context.repo.repo,
# ref: 'refs/tags/<tagname>',
# sha: context.sha
# })

0 comments on commit 50f4f3e

Please sign in to comment.