Skip to content

Commit 67283a7

Browse files
authored
fix(release): Changelog Generator (#9)
1 parent 4d94f7a commit 67283a7

File tree

5 files changed

+78
-46
lines changed

5 files changed

+78
-46
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ INPUT_MILLISECONDS=2400
5757
# RUNNER_DEBUG=""
5858
# RUNNER_NAME=""
5959
# RUNNER_OS=""
60-
RUNNER_TEMP=".local/tmp"
61-
RUNNER_TOOL_CACHE=".local/cache"
60+
RUNNER_TEMP=.local/tmp
61+
RUNNER_TOOL_CACHE=.local/cache

.github/workflows/ci.yml

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ on: # rebuild any PRs and main branch changes
77
push:
88
branches:
99
- main
10-
- 'releases/*'
10+
11+
permissions: {}
1112

1213
jobs:
1314
build: # make sure build/ci work properly
1415
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
1518
steps:
1619
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1720
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
@@ -24,6 +27,8 @@ jobs:
2427
git diff --exit-code ':!dist/index.js.map' ':!badges/coverage.svg'
2528
test: # make sure the action works on a clean machine without building
2629
runs-on: ${{ matrix.os }}
30+
permissions:
31+
contents: read
2732
strategy:
2833
matrix:
2934
os: [ubuntu-latest, macos-latest, windows-latest]
@@ -42,3 +47,65 @@ jobs:
4247
version: 0.28.0
4348
- name: Get the version
4449
run: stackit --version | grep 0.28.0
50+
51+
super-lint:
52+
name: super-lint
53+
runs-on: ubuntu-24.04
54+
permissions:
55+
contents: read
56+
steps:
57+
- name: Checkout Code
58+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
with:
60+
fetch-depth: 0
61+
62+
- name: Lint Code Base
63+
uses: super-linter/super-linter/slim@4e8a7c2bf106c4c766c816b35ec612638dc9b6b2 # v7.3.0
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
MULTI_STATUS: false
67+
LINTER_RULES_PATH: .
68+
VALIDATE_ALL_CODEBASE: true
69+
VALIDATE_BASH: true
70+
VALIDATE_BASH_EXEC: true
71+
VALIDATE_EDITORCONFIG: true
72+
VALIDATE_ENV: true
73+
VALIDATE_GITHUB_ACTIONS: true
74+
VALIDATE_HTML: true
75+
# VALIDATE_JSON: true
76+
VALIDATE_NATURAL_LANGUAGE: true
77+
# VALIDATE_RENOVATE: true
78+
VALIDATE_SHELL_SHFMT: true
79+
VALIDATE_XML: true
80+
VALIDATE_YAML: true
81+
82+
release:
83+
if: github.repository_owner == 'jkroepke' && github.ref_name == 'main'
84+
name: Release
85+
runs-on: ubuntu-latest
86+
needs:
87+
- build
88+
- test
89+
- super-lint
90+
permissions:
91+
contents: write
92+
steps:
93+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
94+
id: app-token
95+
with:
96+
app-id: 1248576
97+
private-key: ${{ secrets.APP_RENOVATE_HELPER_PRIVATE_KEY }}
98+
- name: Checkout
99+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
100+
with:
101+
fetch-depth: 0
102+
- name: Setup Node.js
103+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
104+
with:
105+
node-version: '22'
106+
- name: Install dependencies
107+
run: npm clean-install
108+
- name: Release
109+
env:
110+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
111+
run: npx semantic-release

.github/workflows/release-changelog.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@ on:
33
release:
44
types: [published]
55

6+
permissions: {}
7+
68
jobs:
79
regenerate:
810
if: github.repository_owner == 'jkroepke'
911
name: 'regenerate'
1012
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
1115
steps:
1216
- name: Update notes
1317
run: |
1418
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/releases/generate-notes -f tag_name=${{ github.ref_name }} | jq -r '.body')
1519
RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/releases/tags/${{ github.ref_name }} | jq -r '.id')
16-
gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/releases/$RELEASE_ID -f body=$NEW_NOTES
20+
gh api --method PATCH -H "Accept: application/vnd.github+json" "/repos/${{ github.repository }}/releases/$RELEASE_ID" -f "body=$NEW_NOTES"
1721
env:
1822
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1923
RELEASE_TAG: ${{ github.event.release.tag_name }}

.github/workflows/release.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/update-major-tag.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
- run: |
18-
TAG=${{ github.ref_name }}
19-
TAG=${TAG%%.*}
20-
git tag -f ${TAG}
18+
TAG="${{ github.ref_name }}"
19+
TAG="${TAG%%.*}"
20+
git tag -f "${TAG}"
2121
git push --tags --force

0 commit comments

Comments
 (0)