diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9cbe26e..e2dc47b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - name: Print ref name + - name: Print tag run: | echo "${{ github.ref_name }}" - name: Checkout @@ -34,8 +34,16 @@ jobs: - name: Set submodule tags uses: actions/github-script@v7 with: - script: | + github-token: ${{ secrets.RELEASE_GITHUB_TOKEN }}} + script: | var submodules = ['stdlib', 'pgx', 'sqlx', 'gorm'] for (const submodule of submodules) { - console.log(`refs/tags/${submodule}/${{ github.ref_name }}`) + var tag = `refs/tags/${submodule}/${{ github.ref_name }}` + console.log(`add submodule tag: ${tag}`) + github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: '${tag}', + sha: context.sha + }) } \ No newline at end of file