Skip to content

Commit d279539

Browse files
committed
ci: cleanup workflows
1 parent c857af2 commit d279539

File tree

5 files changed

+148
-94
lines changed

5 files changed

+148
-94
lines changed

.github/workflows/docker-build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on:
1212
branches:
1313
- "main"
1414

15-
env:
16-
BASE_IMAGE_NAME: geokrety/postgres
17-
1815
jobs:
1916
docker:
2017
runs-on: ubuntu-latest

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
pre-commit:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

16-
- uses: actions/setup-python@v2
16+
- uses: actions/setup-python@v4
1717

18-
- uses: pre-commit/action@v2.0.3
18+
- uses: pre-commit/action@v3.0.0

.github/workflows/semantic-release.yml

Lines changed: 12 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,28 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read # for checkout
10+
811
jobs:
912
release:
1013
if: "!contains(github.event.head_commit.message, 'skip ci')"
1114
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write # to be able to publish a GitHub release
17+
issues: write # to be able to comment on released issues
18+
pull-requests: write # to be able to comment on released pull requests
1219
steps:
1320
- name: Checkout
1421
uses: actions/checkout@v3
1522
with:
16-
ssh-key: "${{ secrets.COMMIT_KEY }}"
23+
fetch-depth: 0
1724

1825
# setting up Node
1926
- name: Setup Node.js
2027
uses: actions/setup-node@v3
2128
with:
22-
node-version: 18
29+
node-version: "lts/*"
2330

2431
# disable package-lock.json to stop it being created
2532
- name: Disable package-lock.json
@@ -28,96 +35,13 @@ jobs:
2835
# Installing package dependencies
2936
- name: Install dependencies
3037
run: |
31-
npm i -D [email protected] conventional-changelog-conventionalcommits semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/exec @semantic-release/changelog @semantic-release/github @semantic-release/git
38+
npm i -D [email protected] conventional-changelog-conventionalcommits semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/exec @semantic-release/changelog @semantic-release/github
3239
3340
- name: New tag
3441
env:
35-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
42+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
3643
GIT_AUTHOR_NAME: geokrety-bot
3744
GIT_AUTHOR_EMAIL: [email protected]
3845
GIT_COMMITTER_NAME: geokrety-bot
3946
GIT_COMMITTER_EMAIL: [email protected]
40-
run: |
41-
cat > .releaserc.json <<EOF
42-
{
43-
"branches": ["semver", "main", "master"],
44-
"debug": "true",
45-
"plugins": [
46-
["@semantic-release/commit-analyzer",{
47-
"preset": "angular",
48-
"releaseRules": [
49-
{"breaking": true, "release": "major"},
50-
{"type": "feat", "release": "minor"},
51-
{"type": "fix", "release": "patch"},
52-
{"type": "docs", "release": false},
53-
{"type": "style", "release": "patch"},
54-
{"type": "refactor", "release": "patch"},
55-
{"type": "perf", "release": "patch"},
56-
{"type": "test", "release": false},
57-
{"type": "chore", "release": "patch"},
58-
{"type": "dependencies", "release": "patch"},
59-
{"type": "revert", "release": "patch"},
60-
{"type": "translation", "release": "patch"},
61-
{"type": "ci", "release": "patch"}
62-
],
63-
"parserOpts": {
64-
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
65-
}
66-
}],
67-
["@semantic-release/release-notes-generator",{
68-
"preset": "conventionalCommits",
69-
"parserOpts": {
70-
"noteKeywords": [
71-
"BREAKING CHANGE",
72-
"BREAKING CHANGES"
73-
]
74-
},
75-
"presetConfig": {
76-
"types": [
77-
{
78-
"type": "feat",
79-
"section": "Features"
80-
},
81-
{
82-
"type": "fix",
83-
"section": "Bug Fixes"
84-
},
85-
{
86-
"type": "perf",
87-
"section": "Performance Improvements"
88-
},
89-
{
90-
"type": "revert",
91-
"section": "Reverts"
92-
},
93-
{
94-
"type": "translation",
95-
"section": "Translations"
96-
},
97-
{
98-
"type": "refactor",
99-
"section": "Code Refactoring"
100-
},
101-
{
102-
"type": "style",
103-
"section": "Style"
104-
},
105-
{
106-
"type": "dependencies",
107-
"section": "Dependencies",
108-
"hidden": false
109-
},
110-
{
111-
"type": "chore",
112-
"section": "Chores",
113-
"hidden": false
114-
}
115-
]
116-
}
117-
}],
118-
"@semantic-release/changelog",
119-
"@semantic-release/github"
120-
]
121-
}
122-
EOF
123-
47+
run: npx semantic-release

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ repos:
1313
- id: end-of-file-fixer
1414
- id: check-yaml
1515
- id: check-added-large-files
16+
- id: check-json
17+
- id: pretty-format-json
18+
args: ["--autofix"]
1619

1720
- repo: https://github.com/Lucas-C/pre-commit-hooks
1821
rev: v1.1.9

.releaserc.json

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"debug": "true",
6+
"plugins": [
7+
[
8+
"@semantic-release/commit-analyzer",
9+
{
10+
"parserOpts": {
11+
"noteKeywords": [
12+
"BREAKING CHANGE",
13+
"BREAKING CHANGES"
14+
]
15+
},
16+
"preset": "angular",
17+
"releaseRules": [
18+
{
19+
"breaking": true,
20+
"release": "major"
21+
},
22+
{
23+
"release": "minor",
24+
"type": "feat"
25+
},
26+
{
27+
"release": "patch",
28+
"type": "fix"
29+
},
30+
{
31+
"release": false,
32+
"type": "docs"
33+
},
34+
{
35+
"release": "patch",
36+
"type": "style"
37+
},
38+
{
39+
"release": "patch",
40+
"type": "refactor"
41+
},
42+
{
43+
"release": "patch",
44+
"type": "perf"
45+
},
46+
{
47+
"release": false,
48+
"type": "test"
49+
},
50+
{
51+
"release": "patch",
52+
"type": "chore"
53+
},
54+
{
55+
"release": "patch",
56+
"type": "dependencies"
57+
},
58+
{
59+
"release": "patch",
60+
"type": "revert"
61+
},
62+
{
63+
"release": "patch",
64+
"type": "translation"
65+
},
66+
{
67+
"release": "patch",
68+
"type": "ci"
69+
}
70+
]
71+
}
72+
],
73+
[
74+
"@semantic-release/release-notes-generator",
75+
{
76+
"parserOpts": {
77+
"noteKeywords": [
78+
"BREAKING CHANGE",
79+
"BREAKING CHANGES"
80+
]
81+
},
82+
"preset": "conventionalCommits",
83+
"presetConfig": {
84+
"types": [
85+
{
86+
"section": "Features",
87+
"type": "feat"
88+
},
89+
{
90+
"section": "Bug Fixes",
91+
"type": "fix"
92+
},
93+
{
94+
"section": "Performance Improvements",
95+
"type": "perf"
96+
},
97+
{
98+
"section": "Reverts",
99+
"type": "revert"
100+
},
101+
{
102+
"section": "Translations",
103+
"type": "translation"
104+
},
105+
{
106+
"section": "Code Refactoring",
107+
"type": "refactor"
108+
},
109+
{
110+
"section": "Style",
111+
"type": "style"
112+
},
113+
{
114+
"hidden": false,
115+
"section": "Dependencies",
116+
"type": "dependencies"
117+
},
118+
{
119+
"hidden": false,
120+
"section": "Chores",
121+
"type": "chore"
122+
}
123+
]
124+
}
125+
}
126+
],
127+
"@semantic-release/changelog",
128+
"@semantic-release/github"
129+
]
130+
}

0 commit comments

Comments
 (0)