Skip to content

Commit

Permalink
🔀 Merge pull requests #381, #382, #383, #384, and #385 from 'v1.0.13'…
Browse files Browse the repository at this point in the history
…, 'ci/alternate-impl-to-create-release' and 'doc/update-the-change-logs', remote-tracking branches 'dependabot/npm_and_yarn/eslint-8.32.0' and 'dependabot/npm_and_yarn/rimraf-4.0.7'

Signed-off-by: kei-g <km.8k6ce+github@gmail.com>
  • Loading branch information
kei-g committed Jan 16, 2023
6 parents fa95fa9 + 74afcfd + a7f72ca + 64f571d + 5a80c6a + 05220dc commit 4050a5c
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 44 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"asynciterable",
"autobuild",
"codeql",
"commitish",
"devel",
"esbuild",
"linebreak",
Expand Down
69 changes: 44 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,56 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 1
- id: commit_summary
name: Get commit summary
- name: Create a release
uses: actions/github-script@v6
with:
script: |
const { owner, repo } = context.repo
const { ref, sha } = context
const version = ref.slice(11)
const child_process = require('node:child_process')
const { ref } = context
core.setOutput('version', ref.slice(11))
child_process.execSync(`git fetch --depth 1 origin +${ref}:${ref}`)
child_process.exec(
`git for-each-ref --format='%(contents)' ${ref}`,
{},
(err, stdout, stderr) => {
const i = stdout.search(/Signed\-off\-by\:\ /g)
if (i < 0)
core.setFailed('There is no signature')
else
core.setOutput('message', stdout.slice(0, i))
}
`git fetch --depth 1 origin +${ref}:${ref}`,
{}
() => child_process.exec(
`git for-each-ref --format='%(contents)' ${ref}`,
{},
async (err, stdout, stderr) => {
if (err)
return core.setFailed(err)
const i = stdout.search(/^Signed\-off\-by\:\ /g)
const j = stdout.search(/^\-{5}BEGIN\ PGP\ SIGNATURE\-{5}$/g)
const body = i < 0 ? j < 0 ? stdout : stdout.slice(0, j) : stdout.slice(0, i)
const response = await github.request(
`POST /repos/${owner}/${repo}/releases`,
{
body,
draft: false,
name: `Version ${version}`,
owner,
prerelease: false,
repo,
tag_name: `v${version}`,
target_commitish: sha,
}
)
switch (response.status) {
case 201:
core.setOutput('result', 'success')
break
case 404:
core.setFailed('Not Found if the discussion category name is invalid')
break
case 422:
core.setFailed('Validation failed, or the endpoint has been spammed')
break
default:
core.setFailed(`Unknown error, status=${response.status}`)
break
}
}
)
)
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Create Release
uses: actions/create-release@v1
with:
body: |
${{ steps.commit_summary.outputs.message }}
draft: false
prerelease: false
release_name: Version ${{ steps.commit_summary.outputs.version }}
tag_name: v${{ steps.commit_summary.outputs.version }}
npm:
if: github.ref_type == 'tag'
name: npm
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLogs

## Version 1.0.13

- :arrow_up: Packages for development are bumped
- `eslint` is bumped from 8.31.0 to 8.32.0
- `rimraf` is bumped from 4.0.4 to 4.0.7

## Version 1.0.12

- :arrow_up: Packages for development are bumped
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"@typescript-eslint/parser": "^5.48.1",
"chai": "^4.3.7",
"esbuild": "^0.17.0",
"eslint": "^8.31.0",
"eslint": "^8.32.0",
"mocha": "^10.2.0",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"rimraf": "^4.0.4",
"rimraf": "^4.0.7",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
},
Expand Down Expand Up @@ -56,5 +56,5 @@
"test": "run-p lint cover"
},
"types": "index.d.ts",
"version": "1.0.12"
"version": "1.0.13"
}

0 comments on commit 4050a5c

Please sign in to comment.