-
Notifications
You must be signed in to change notification settings - Fork 464
39 lines (36 loc) · 1.25 KB
/
release-tflint-plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: release-tflint
on:
push:
tags:
- tflint-ruleset-blueprint/v*.*.*
permissions:
contents: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'tflint-ruleset-blueprint'
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'tflint-ruleset-blueprint/go.mod'
- run: echo "GORELEASER_CURRENT_TAG=${GITHUB_REF#refs/tags/tflint-ruleset-blueprint/}" >> $GITHUB_ENV
- run: echo "${{env.GORELEASER_CURRENT_TAG}}"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: latest
args: release --clean --skip=validate,publish
workdir: tflint-ruleset-blueprint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: upload
run: |
gh release upload "tflint-ruleset-blueprint/${{env.GORELEASER_CURRENT_TAG}}" dist/tflint-ruleset-blueprint_*.zip dist/checksums.txt --repo ${{ github.repository }} --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}