-
Notifications
You must be signed in to change notification settings - Fork 25
84 lines (78 loc) · 2.24 KB
/
publish.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: publish
on:
release:
types:
- published
# Add concurrency to prevent multiple simultaneous runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set release notes tag
run: |
export RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Check version tags
run: make release-check
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
with:
tflint_version: v0.50.0
- name: Install dependencies
run: make dev
- name: Run all checks
run: make pr
publish_pypi:
needs: run_tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set release notes tag
run: |
export RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: make -C cfn-lint-serverless dev
- name: Upload to PyPi
run: make -C cfn-lint-serverless release
env:
PYPI_USERNAME: __token__
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN25 }}
publish_go:
needs: run_tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist
workdir: tflint-ruleset-aws-serverless/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}