Skip to content

Commit

Permalink
first attempt at an automatic tag and release in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneCypher committed Apr 18, 2022
1 parent aeaf6a5 commit 8244758
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 18 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/nodejs.yml
Expand Up @@ -49,7 +49,7 @@ jobs:
github-token: ${{ secrets.github_token }}
path-to-lcov: ./coverage/spec/lcov.info

verify-version-bump:
verify-version-bump-then-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -59,9 +59,11 @@ jobs:
node-version: 17.x
- name: Verify the version was bumped
run: node ./src/buildjs/verify_version_bump.js

github-tag-and-release:
runs-on: ubuntu-latest
steps:
- name: TODO
run: echo TODO
- name: Create the release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }}
release_name: ${{ env.TAG }}
body_path: CHANGELOG.tmp
2 changes: 1 addition & 1 deletion dist/es6/version.js
@@ -1,2 +1,2 @@
const version = "5.41.1";
const version = "5.41.3";
export { version };
2 changes: 1 addition & 1 deletion dist/jssm.es5.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jssm.es5.cjs.nonmin.js
Expand Up @@ -15885,7 +15885,7 @@ function peg$parse(input, options) {
}
}

const version = "5.41.1";
const version = "5.41.3";

// whargarbl lots of these return arrays could/should be sets
/* eslint-disable complexity */
Expand Down
2 changes: 1 addition & 1 deletion dist/jssm.es5.iife.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jssm.es5.iife.nonmin.js
Expand Up @@ -15884,7 +15884,7 @@ var jssm = (function (exports) {
}
}

const version = "5.41.1";
const version = "5.41.3";

// whargarbl lots of these return arrays could/should be sets
/* eslint-disable complexity */
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/classes/Machine.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/docs/modules.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "jssm",
"version": "5.41.1",
"version": "5.41.3",
"engines": {
"node": ">=10.0.0"
},
Expand Down
8 changes: 6 additions & 2 deletions src/buildjs/verify_version_bump.js
Expand Up @@ -7,7 +7,8 @@ const package = readFileSync('./package.json'),
pJson = JSON.parse(package),
priv_version = pJson.version;

const public_version = `${execSync('npm view jssm version')}`.trim();
const public_version = `${execSync('npm view jssm version')}`.trim(),
last_commit_msg = `${execSync('git show -s --format=%s')}`.trim().replace(/[^0-9a-z _\-=]/gi, '');



Expand All @@ -19,7 +20,10 @@ if (semver.valid(public_version)) {
if (semver.gt(priv_version, public_version)) {


console.log(`Version is updated; passing ☑ (public ${public_version}, private ${priv_version}`);
console.log(`Version is updated; passing ☑\n (public ${public_version}, private ${priv_version}\n\nApplying tags`);
execSync(`git tag -a v${priv_version} -m ${JSON.stringify(last_commit_msg)}`);
console.log(` Pushing tags`);
execSync(`git push origin --tags`);
process.exit(0);


Expand Down
2 changes: 1 addition & 1 deletion src/ts/version.ts
@@ -1,3 +1,3 @@

const version: string = "5.41.1";
const version: string = "5.41.3";
export { version };

0 comments on commit 8244758

Please sign in to comment.