Skip to content

Commit ce8bce5

Browse files
authored
Merge pull request #109 from TAServers/95-versioning-overhaul
95 - Versioning overhaul
2 parents 2cca63b + c959fae commit ce8bce5

File tree

15 files changed

+14759
-11395
lines changed

15 files changed

+14759
-11395
lines changed

.github/pull_request_template.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
<!--
22
PR pre-flight checks:
3+
- If modifying Lest:
4+
- Have you updated the package version in `package.json`?
5+
- Have you run `npm install` to update `package-lock.json`?
6+
- Have you added a matching changelog entry in `packages/lest/CHANGELOG.md`?
37
- Have you updated any relevant documentation?
4-
- Have you used appropriate conventional commit names, and have you tagged breaking changes?
5-
- https://cheatography.com/albelop/cheat-sheets/conventional-commits/
68
- Have you done a brief self-review of your changes to check if you've missed anything?
7-
- If working on a ticket with defined scope and/or acceptance criteria, have you checked that you've hit everything?
8-
- If you intentionally haven't followed the ticket's requirements, please describe which requirements haven't been hit and why
9+
- If working on an issue with defined scope and/or acceptance criteria, have you checked that you've hit everything?
10+
- If you intentionally haven't followed the issue's requirements, please describe which requirements haven't been hit and why
911
-->
1012

11-
## Ticket
13+
## Issue
1214

13-
<!-- Add a link to the ticket below (remove this section if the PR has no related ticket) -->
15+
<!-- Add the number of the issue this resolves below (remove this section if there's no matching issue) -->
1416

15-
Resolves [LEST-](https://taservers.atlassian.net/browse/LEST-)
17+
Resolves #
1618

1719
## Changes
1820

@@ -30,6 +32,6 @@ Resolves [LEST-](https://taservers.atlassian.net/browse/LEST-)
3032

3133
[API Docs](https://taservers.github.io/lest/docs/api/expect)
3234

33-
[Project Board](https://taservers.atlassian.net/jira/software/c/projects/LEST/boards/4)
35+
[Project Board](https://github.com/orgs/TAServers/projects/1)
3436

3537
[Discord](https://discord.tasevers.com)

.github/workflows/commitlint.yml

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

.github/workflows/lest.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ jobs:
2727
version: latest
2828
args: --check ./packages/lest
2929

30+
- name: Extract package version
31+
id: version
32+
run: echo "version=$(cat ./packages/lest/package.json | jq -r '.version')" >> "$GITHUB_OUTPUT"
33+
34+
- uses: mindsers/changelog-reader-action@v2
35+
id: changelog
36+
with:
37+
validation_level: error
38+
version: ${{ steps.version.outputs.version }}
39+
path: ./packages/lest/CHANGELOG.md
40+
3041
test:
3142
runs-on: ubuntu-latest
3243
strategy:

.github/workflows/release.yml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,45 +31,42 @@ jobs:
3131
cache: "npm"
3232
registry-url: "https://registry.npmjs.org"
3333

34-
- name: Generate changelog
34+
- name: Publish to NPM
35+
uses: JS-DevTools/npm-publish@v3
36+
id: publish
37+
with:
38+
token: ${{ secrets.NPM_TOKEN }}
39+
package: packages/lest
40+
provenance: true
41+
strategy: upgrade
42+
43+
- name: Parse CHANGELOG.md
44+
uses: mindsers/changelog-reader-action@v2
3545
id: changelog
36-
uses: TriPSs/conventional-changelog-action@v3
46+
if: steps.publish.outputs.type
3747
with:
38-
github-token: ${{ secrets.github_token }}
39-
output-file: "false"
40-
skip-commit: "true"
41-
skip-version-file: "true"
42-
git-path: "packages/lest"
48+
validation_level: warn
49+
version: ${{ steps.publish.outputs.version }}
50+
path: ./packages/lest/CHANGELOG.md
4351

4452
- name: Push release
4553
uses: softprops/action-gh-release@v1
46-
if: steps.changelog.outputs.skipped != 'true'
54+
if: steps.publish.outputs.type
4755
with:
4856
files: packages/lest/dist/lua/lest.lua
49-
tag_name: ${{ steps.changelog.outputs.tag }}
50-
name: Lest - ${{ steps.changelog.outputs.tag }}
51-
body: ${{ steps.changelog.outputs.clean_changelog }}
57+
tag_name: v${{ steps.publish.outputs.version }}
58+
name: Lest - v${{ steps.publish.outputs.version }}
59+
body: ${{ steps.changelog.outputs.changes }}
5260

5361
- name: Update latest tag
5462
uses: EndBug/latest-tag@latest
55-
if: steps.changelog.outputs.skipped != 'true'
63+
if: steps.publish.outputs.type
5664

5765
- name: Push release for latest tag
5866
uses: softprops/action-gh-release@v1
59-
if: steps.changelog.outputs.skipped != 'true'
67+
if: steps.publish.outputs.type
6068
with:
6169
files: packages/lest/dist/lua/lest.lua
6270
tag_name: latest
63-
name: Lest - ${{ steps.changelog.outputs.tag }}
64-
body: ${{ steps.changelog.outputs.clean_changelog }}
65-
66-
- name: Update package.json version
67-
if: steps.changelog.outputs.skipped != 'true'
68-
run: "sed -i 's/{{VERSION}}/${{ steps.changelog.outputs.tag }}/g' packages/lest/package.json"
69-
70-
- name: Publish to NPM
71-
if: steps.changelog.outputs.skipped != 'true'
72-
working-directory: packages/lest
73-
run: npm publish --provenance
74-
env:
75-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
71+
name: Lest - ${{ steps.publish.outputs.version }}
72+
body: ${{ steps.changelog.outputs.changes }}

.husky/commit-msg

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

commitlint.config.js

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

0 commit comments

Comments
 (0)