-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- https://github.com/flex-development/grease/tree/[email protected] Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
e81d518
commit 7b86f4b
Showing
48 changed files
with
636 additions
and
3,090 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
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 |
---|---|---|
|
@@ -50,5 +50,5 @@ max_line_length = 130 | |
max_line_length = 100 | ||
|
||
# yaml | ||
[*.yml] | ||
[{*.yaml,*.yml}] | ||
max_line_length = 100 |
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ chb = "!f() { git checkout -b \"$@\" && git pou \"$@\"; }; f" | |
chp = "!f() { git checkout $@ && git pull; }; f" | ||
|
||
# commit with message | ||
cm = "!f() { git commit -s -m \"$@\"; }; f" | ||
cm = "!f() { git commit -S -s -m \"$@\"; }; f" | ||
|
||
# tell git to start tracking branch and push to origin | ||
pou = "!f() { git push origin --no-verify -u $@; }; f" | ||
|
@@ -62,7 +62,7 @@ fpnv = "!f() { git pnv --force ; }; f" | |
pnv = "!f() { git push --no-verify $@; }; f" | ||
|
||
[branch] | ||
autosetuprebase = always | ||
autoSetupRebase = always | ||
|
||
[checkout] | ||
defaultRemote = origin | ||
|
@@ -85,6 +85,12 @@ tool = vscode | |
[difftool "vscode"] | ||
cmd = code-insiders --wait --diff $LOCAL $REMOTE | ||
|
||
[filter "lfs"] | ||
clean = git-lfs clean -- %f | ||
smudge = git-lfs smudge -- %f | ||
process = git-lfs filter-process | ||
required = true | ||
|
||
[gitflow "prefix"] | ||
feature = feat/ | ||
hotfix = hotfix/ | ||
|
@@ -97,6 +103,10 @@ program = gpg2 | |
[init] | ||
defaultBranch = main | ||
|
||
[log] | ||
date = iso8601-strict | ||
decorate = short | ||
|
||
[merge] | ||
tool = vscode | ||
|
||
|
@@ -111,6 +121,8 @@ autoStash = true | |
|
||
[tag] | ||
forceSignAnnotated = true | ||
gpgsign = true | ||
sort = -creatordate | ||
|
||
[url "[email protected]:"] | ||
insteadOf = gh: | ||
|
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
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 |
---|---|---|
|
@@ -89,7 +89,7 @@ jobs: | |
key: ${{ steps.cache-key.outputs.result }} | ||
path: ${{ env.CACHE_PATH }} | ||
- id: version | ||
name: Get package version | ||
name: Get manifest version | ||
run: echo "result=$(jq .version package.json -r)" >>$GITHUB_OUTPUT | ||
- id: version-typescript | ||
name: Get TypeScript version | ||
|
@@ -322,6 +322,7 @@ jobs: | |
with: | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
check-latest: true | ||
node-version: ${{ matrix.node-version }} | ||
- id: cache | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
|
@@ -405,3 +406,41 @@ jobs: | |
with: | ||
name: ${{ env.TARFILE }} | ||
path: ${{ env.TARFILE }} | ||
changelog: | ||
needs: | ||
- build | ||
- commitlint | ||
- format | ||
- gitguardian | ||
- lint | ||
- preflight | ||
- spelling | ||
- test | ||
- typescript | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_NO_WARNINGS: 1 | ||
steps: | ||
- id: checkout | ||
name: Checkout ${{ env.REF_NAME }} | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
ref: ${{ env.REF }} | ||
- id: node | ||
name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
node-version-file: .nvmrc | ||
- id: cache | ||
name: Restore dependencies cache | ||
uses: actions/[email protected] | ||
with: | ||
key: ${{ needs.preflight.outputs.cache-key }} | ||
path: ${{ env.CACHE_PATH }} | ||
- id: summary | ||
name: Get changelog preview | ||
run: echo "$(grease changelog)" >>$GITHUB_STEP_SUMMARY |
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 |
---|---|---|
|
@@ -37,15 +37,16 @@ on: | |
type: string | ||
env: | ||
REF: ${{ inputs.sha || github.event.pull_request.merge_commit_sha }} | ||
REF_NAME: ${{ format('main@{0}', inputs.sha || github.event.pull_request.merge_commit_sha) }} | ||
REF_NAME: | | ||
${{ format('{0}@{1}', github.base_ref, inputs.sha || github.event.pull_request.merge_commit_sha) }} | ||
jobs: | ||
preflight: | ||
if: | | ||
(github.event.pull_request.merged && startsWith(github.head_ref, 'release/')) || | ||
(github.event_name == 'workflow_dispatch' && github.ref_name == 'main') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
runs-on: ubuntu-latest | ||
outputs: | ||
prerelease: ${{ steps.dist-tag.outputs.prerelease }} | ||
tag: ${{ steps.tag.outputs.result }} | ||
|
@@ -60,11 +61,11 @@ jobs: | |
with: | ||
ref: ${{ env.REF }} | ||
- id: version | ||
name: Get package version | ||
name: Get release version | ||
run: echo "result=$(jq .version package.json -r)" >>$GITHUB_OUTPUT | ||
- id: tag-prefix | ||
name: Get release tag prefix | ||
run: echo "result=$(jq .tagPrefix package.json -r)" >>$GITHUB_OUTPUT | ||
run: echo "result=$(jq .tagprefix grease.config.json -r)" >>$GITHUB_OUTPUT | ||
- id: tag | ||
name: Get release tag | ||
run: | | ||
|
@@ -76,23 +77,16 @@ jobs: | |
target: ${{ steps.version.outputs.result }} | ||
publish: | ||
needs: preflight | ||
permissions: | ||
contents: write | ||
packages: read | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: release | ||
url: | ||
${{ format('{0}/{1}/releases/tag/{2}', github.server_url, github.repository, | ||
needs.preflight.outputs.tag) }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_REPO_TOKEN }} | ||
HUSKY: 0 | ||
NODE_ENV: production | ||
NODE_NO_WARNINGS: 1 | ||
NOTES_FILE: ./RELEASE_NOTES.md | ||
PRERELEASE: ${{ needs.preflight.outputs.prerelease }} | ||
TAG: ${{ needs.preflight.outputs.tag }} | ||
NOTES_FILE: RELEASE_NOTES.md | ||
steps: | ||
- id: checkout | ||
name: Checkout ${{ env.REF_NAME }} | ||
|
@@ -101,47 +95,39 @@ jobs: | |
fetch-depth: 0 | ||
persist-credentials: true | ||
ref: ${{ env.REF }} | ||
token: ${{ env.GITHUB_TOKEN }} | ||
- id: gpg-import | ||
name: Import GPG key | ||
uses: crazy-max/[email protected] | ||
with: | ||
git_config_global: true | ||
git_push_gpgsign: false | ||
git_tag_gpgsign: true | ||
git_user_signingkey: true | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
# todo: remove when https://github.com/crazy-max/ghaction-import-gpg/issues/118 is resolved | ||
- id: gpg-trust | ||
name: Set trust on GPG key | ||
run: | | ||
gpg --no-tty --command-fd 0 --edit-key ${{ steps.gpg-import.outputs.keyid }} << EOTRUST | ||
trust | ||
5 | ||
y | ||
quit | ||
EOTRUST | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
trust_level: 5 | ||
- id: yarn | ||
name: Install dependencies | ||
run: yarn | ||
- id: pack | ||
name: Pack project | ||
env: | ||
NODE_NO_WARNINGS: 1 | ||
run: yarn pack -o %s-%v.tgz | ||
- id: release-notes | ||
name: Generate release notes | ||
run: yarn changelog --outfile $NOTES_FILE --write | ||
run: grease changelog -wo $NOTES_FILE && echo "$(cat $NOTES_FILE)" >>$GITHUB_STEP_SUMMARY | ||
- id: tag | ||
name: Create annotated tag | ||
env: | ||
GIT_AUTHOR_EMAIL: ${{ steps.gpg-import.outputs.email }} | ||
GIT_COMMITTER_EMAIL: ${{ steps.gpg-import.outputs.email }} | ||
run: | | ||
git tag --annotate --force --sign $TAG --message "release: $TAG" | ||
git tag --verify $TAG | ||
git push origin $TAG | ||
run: 'grease tag -ps -m "release: {tag}" ${{ needs.preflight.outputs.version }}' | ||
- id: publish | ||
name: Publish release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT_REPO }} | ||
run: gh release create $TAG *.tgz -t=$TAG -p=$PRERELEASE -F=$NOTES_FILE | ||
PRERELEASE: ${{ needs.preflight.outputs.prerelease }} | ||
TAG: ${{ needs.preflight.outputs.tag }} | ||
run: | | ||
gh release create $TAG *.tgz --title=$TAG --notes-file=$NOTES_FILE --verify-tag --prerelease=$PRERELEASE --discussion-category=releases | ||
- id: close-issues | ||
name: Close released issues | ||
uses: bdougie/close-issues-based-on-label@master | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# https://docs.npmjs.com/cli/configuring-npm/npmrc | ||
|
||
@flex-development:registry=https://npm.pkg.github.com | ||
//npm.pkg.github.com/:_authToken=${PAT_BOT} | ||
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} | ||
//npm.pkg.github.com/:always-auth=true |
Oops, something went wrong.