Skip to content

[#120] actions/github-script@v7: add submodule tags automatically #68

[#120] actions/github-script@v7: add submodule tags automatically

[#120] actions/github-script@v7: add submodule tags automatically #68

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9].[0-9]+.[0-9]+'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Print ref name
run: |
echo "${{ github.ref_name }}"
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean --debug
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- name: Set submodule tags
uses: actions/github-script@v7
with:
script: |
var submodules = ['stdlib', 'pgx', 'sqlx', 'gorm']
for (const submodule of submodules) {
console.log(`refs/tags/${submodule}/${{ github.ref_name }}`)
}