Skip to content

Commit

Permalink
Merge pull request #109 from TAServers/95-versioning-overhaul
Browse files Browse the repository at this point in the history
95 - Versioning overhaul
  • Loading branch information
Derpius authored Dec 2, 2023
2 parents 2cca63b + c959fae commit ce8bce5
Show file tree
Hide file tree
Showing 15 changed files with 14,759 additions and 11,395 deletions.
18 changes: 10 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<!--
PR pre-flight checks:
- If modifying Lest:
- Have you updated the package version in `package.json`?
- Have you run `npm install` to update `package-lock.json`?
- Have you added a matching changelog entry in `packages/lest/CHANGELOG.md`?
- Have you updated any relevant documentation?
- Have you used appropriate conventional commit names, and have you tagged breaking changes?
- https://cheatography.com/albelop/cheat-sheets/conventional-commits/
- Have you done a brief self-review of your changes to check if you've missed anything?
- If working on a ticket with defined scope and/or acceptance criteria, have you checked that you've hit everything?
- If you intentionally haven't followed the ticket's requirements, please describe which requirements haven't been hit and why
- If working on an issue with defined scope and/or acceptance criteria, have you checked that you've hit everything?
- If you intentionally haven't followed the issue's requirements, please describe which requirements haven't been hit and why
-->

## Ticket
## Issue

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

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

## Changes

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

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

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

[Discord](https://discord.tasevers.com)
24 changes: 0 additions & 24 deletions .github/workflows/commitlint.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/lest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ jobs:
version: latest
args: --check ./packages/lest

- name: Extract package version
id: version
run: echo "version=$(cat ./packages/lest/package.json | jq -r '.version')" >> "$GITHUB_OUTPUT"

- uses: mindsers/changelog-reader-action@v2
id: changelog
with:
validation_level: error
version: ${{ steps.version.outputs.version }}
path: ./packages/lest/CHANGELOG.md

test:
runs-on: ubuntu-latest
strategy:
Expand Down
49 changes: 23 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,45 +31,42 @@ jobs:
cache: "npm"
registry-url: "https://registry.npmjs.org"

- name: Generate changelog
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v3
id: publish
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/lest
provenance: true
strategy: upgrade

- name: Parse CHANGELOG.md
uses: mindsers/changelog-reader-action@v2
id: changelog
uses: TriPSs/conventional-changelog-action@v3
if: steps.publish.outputs.type
with:
github-token: ${{ secrets.github_token }}
output-file: "false"
skip-commit: "true"
skip-version-file: "true"
git-path: "packages/lest"
validation_level: warn
version: ${{ steps.publish.outputs.version }}
path: ./packages/lest/CHANGELOG.md

- name: Push release
uses: softprops/action-gh-release@v1
if: steps.changelog.outputs.skipped != 'true'
if: steps.publish.outputs.type
with:
files: packages/lest/dist/lua/lest.lua
tag_name: ${{ steps.changelog.outputs.tag }}
name: Lest - ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
tag_name: v${{ steps.publish.outputs.version }}
name: Lest - v${{ steps.publish.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}

- name: Update latest tag
uses: EndBug/latest-tag@latest
if: steps.changelog.outputs.skipped != 'true'
if: steps.publish.outputs.type

- name: Push release for latest tag
uses: softprops/action-gh-release@v1
if: steps.changelog.outputs.skipped != 'true'
if: steps.publish.outputs.type
with:
files: packages/lest/dist/lua/lest.lua
tag_name: latest
name: Lest - ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}

- name: Update package.json version
if: steps.changelog.outputs.skipped != 'true'
run: "sed -i 's/{{VERSION}}/${{ steps.changelog.outputs.tag }}/g' packages/lest/package.json"

- name: Publish to NPM
if: steps.changelog.outputs.skipped != 'true'
working-directory: packages/lest
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Lest - ${{ steps.publish.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

3 changes: 0 additions & 3 deletions commitlint.config.js

This file was deleted.

Loading

0 comments on commit ce8bce5

Please sign in to comment.