-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We still need this...
- Loading branch information
Showing
7 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,33 +13,48 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Rebuild dist | ||
id: dist | ||
run: | | ||
npm install | ||
npm run package | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add --force dist/index.js | ||
(git commit -m 'Publish dist' && echo '::set-output name=changed::true') || echo '::set-output name=changed::false' | ||
- name: Push rebuild dist | ||
if: ${{ steps.dist.outputs.changed == 'true' }} | ||
run: | | ||
git push origin main | ||
- name: Bump version and push tag | ||
uses: anothrNick/[email protected] | ||
if: ${{ steps.dist.outputs.changed == 'true' }} | ||
id: version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: patch | ||
- name: Major version tag | ||
id: major-version | ||
if: ${{ (steps.version.outputs.new_tag != '') }} | ||
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }} | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
core.setOutput('tag', '${{ steps.version.outputs.new_tag }}'.split('.')[0]) | ||
- name: Tag ${{ steps.major-version.outputs.tag }} | ||
if: ${{ (steps.version.outputs.new_tag != '') }} | ||
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }} | ||
run: | | ||
git tag --force ${{ steps.major-version.outputs.tag }} | ||
git push origin ${{ steps.major-version.outputs.tag }} --force | ||
- name: Get current date | ||
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }} | ||
id: date | ||
run: echo "::set-output name=date::$(date --iso-8601)" | ||
- name: Build full ChangeLog | ||
if: ${{ (steps.version.outputs.new_tag != '') }} | ||
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }} | ||
run: npx conventional-changelog-cli --release-count=0 --preset=eslint --outfile="${{ runner.temp }}/FullChangeLog.md" | ||
- name: Create/update major version release | ||
if: ${{ (steps.version.outputs.new_tag != '') }} | ||
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }} | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -48,10 +63,10 @@ jobs: | |
name: ${{ steps.version.outputs.new_tag }} (${{ steps.date.outputs.date }}) | ||
bodyFile: ${{ runner.temp }}/FullChangeLog.md | ||
- name: Build ChangeLog | ||
if: ${{ (steps.version.outputs.new_tag != '') }} | ||
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }} | ||
run: npx conventional-changelog-cli --release-count=2 --outfile="${{ runner.temp }}/ChangeLog.md" | ||
- name: Create release | ||
if: ${{ (steps.version.outputs.new_tag != '') }} | ||
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }} | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,4 +96,5 @@ Thumbs.db | |
|
||
# Ignore built ts files | ||
__tests__/runner/* | ||
lib/**/* | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters