Skip to content

Commit

Permalink
Merge pull request #11 from A1c0/finish-ci
Browse files Browse the repository at this point in the history
Finish ci
  • Loading branch information
A1c0 authored Dec 1, 2021
2 parents a25661f + bb1eaf9 commit 81f81f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- name: NPM or Yarn install with caching
uses: bahmutov/npm-install@v1
- run : echo "TAG_VERSION=v$(node -e "console.log(require('./package.json').version)")" >> $GITHUB_ENV
- run : echo "PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")" >> $GITHUB_ENV
- run : echo "TAG_VERSION=v$PACKAGE_JSON_VERSION" >> $GITHUB_ENV
- name: Create tag
uses: actions/github-script@v5
with:
Expand All @@ -24,15 +25,24 @@ jobs:
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${TAG_VERSION})`,
ref: `refs/tags/${TAG_VERSION}`,
sha: context.sha
})
- name: Create a release
uses: actions/github-script@v5
with:
script: |
const { TAG_VERSION } = process.env;
const { PACKAGE_JSON_VERSION, TAG_VERSION } = process.env;
const prs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: "all"
}).then(x => x.data);
const pr = prs.find(x => x.merge_commit_sha === context.sha);
const body = (pr && pr.body) || "- some bugfixes or improving performance features";
github.rest.repos.createRelease({
name: `Version ${PACKAGE_JSON_VERSION}`,
body: body,
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: TAG_VERSION,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanctuary-lourdes",
"version": "0.1.5",
"version": "0.1.6",
"main": "index.mjs",
"author": "Alexandre CONTASSOT <alexandrecontassot@hotmail.fr>",
"license": "MIT",
Expand Down

0 comments on commit 81f81f8

Please sign in to comment.