chore: downgrade action versions in GitHub workflows for compatibility

- Changed checkout action from v4 to v3 in both auto-tag.yml and release.yml for consistency.
- Downgraded setup-go action from v5 to v4 and goreleaser action from v5 to v4 to ensure compatibility with existing configurations.
- Removed explicit secrets definitions in auto-tag.yml, allowing the workflow to inherit secrets for improved security.
This commit is contained in:
煎饼果子卷鲨鱼辣椒 2024-12-30 18:29:50 +08:00
parent 5ab9a96c32
commit 9690adf5a4
2 changed files with 6 additions and 9 deletions

View File

@ -18,7 +18,7 @@ jobs:
outputs: outputs:
new_tag: ${{ steps.get_latest_tag.outputs.version }} new_tag: ${{ steps.get_latest_tag.outputs.version }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@ -51,9 +51,6 @@ jobs:
needs: auto-tag needs: auto-tag
if: success() if: success()
uses: ./.github/workflows/release.yml uses: ./.github/workflows/release.yml
secrets: inherit
with: with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
secrets:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}

View File

@ -25,28 +25,28 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
lfs: true lfs: true
submodules: recursive submodules: recursive
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v4
with: with:
go-version: "1.21" go-version: "1.21"
cache: true cache: true
- name: Import GPG key - name: Import GPG key
id: import_gpg id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6 uses: crazy-max/ghaction-import-gpg@v5
if: inputs.gpg_private_key != '' if: inputs.gpg_private_key != ''
with: with:
gpg_private_key: ${{ inputs.gpg_private_key }} gpg_private_key: ${{ inputs.gpg_private_key }}
passphrase: ${{ secrets.PASSPHRASE }} passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5 uses: goreleaser/goreleaser-action@v4
with: with:
distribution: goreleaser distribution: goreleaser
version: latest version: latest