Skip to content

Commit bf264f3

Browse files
jwaspinJ-Oliveros
andauthored
Release and Deploy mdTools v1.1.1 (#69)
* GitHub Action to Deploy to GitHub Pages (and updates) (#58) * Upgrade mdCodes and mdJson-schemas * Increment Patch Version * Update version * add workflow * Set version to 1.1.2 --------- Co-authored-by: Jonathan Oliveros <joliveros@xentity.com> * Fix GitHub Actions Trigger (#60) Removing the requirement that the action only run when a PR is merged. This overcomplicates the process for using the token to write back to the gh-pages repository and is not needed when there are branch protections requiring that all merges must come from a PR. * Chore/update versions (#62) * Fix GitHub Actions Trigger Removing the requirement that the action only run when a PR is merged. This overcomplicates the process for using the token to write back to the gh-pages repository and is not needed when there are branch protections requiring that all merges must come from a PR. * Bump mdcodes and mdjson-schemas to version 2.10.0 and 2.9.5 respectively * Refactor GitHub Actions workflow to include build and deploy jobs, update action versions, and automate tagging and release creation. * Bump version to 1.1.3 in package.json and package-lock.json * Downgrade version to 1.1.1 in package.json --------- Co-authored-by: Jonathan Oliveros <joliveros@xentity.com>
1 parent 706da9b commit bf264f3

File tree

3 files changed

+84
-14
lines changed

3 files changed

+84
-14
lines changed

.github/workflows/gh-pages-deploy.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Use Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: "18"
18+
19+
- name: Install Dependencies
20+
run: npm install
21+
22+
- name: Build
23+
run: npm run build
24+
25+
- name: Upload build artifacts
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: build-output
29+
path: docs
30+
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
36+
- name: Download build artifacts
37+
uses: actions/download-artifact@v4
38+
with:
39+
name: build-output
40+
path: docs
41+
42+
- name: Deploy to GitHub Pages
43+
uses: peaceiris/actions-gh-pages@v3
44+
with:
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
publish_dir: ./docs
47+
48+
- name: Create Tag
49+
id: create_tag
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
run: |
53+
# Read version from package.json
54+
version=$(node -p "require('./package.json').version")
55+
version_tag="v$version"
56+
echo "Version from package.json: $version_tag"
57+
echo "version=$version_tag" >> $GITHUB_OUTPUT
58+
git tag $version_tag
59+
git push origin $version_tag
60+
61+
- name: Create GitHub Release
62+
uses: ncipollo/release-action@v1
63+
with:
64+
tag: ${{ steps.create_tag.outputs.version }}
65+
name: Release ${{ steps.create_tag.outputs.version }}
66+
body: Automated release for version ${{ steps.create_tag.outputs.version }}.
67+
draft: false
68+
prerelease: false
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package-lock.json

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title": "mdJSON Schema Viewer",
33
"name": "mdtools",
44
"description": "Visualize mdJSON schemas using D3.js",
5-
"version": "1.1.0",
5+
"version": "1.1.1",
66
"homepage": "https://github.com/adiwg/mdTools",
77
"repository": {
88
"type": "git",
@@ -33,11 +33,11 @@
3333
"grunt-contrib-watch": "~1",
3434
"grunt-env": "~0",
3535
"grunt-preprocess": "~5",
36-
"mdcodes": "2.9.0",
37-
"mdjson-schemas": "2.9.0"
36+
"mdcodes": "2.10.0",
37+
"mdjson-schemas": "2.9.5"
3838
},
3939
"scripts": {
40-
"build": "grunt prod",
40+
"build": "npm install && grunt prod",
4141
"deploy": "gh-pages -d docs",
4242
"dev": "grunt dev",
4343
"start": "grunt",

0 commit comments

Comments
 (0)