Skip to content

Commit

Permalink
Release and Deploy mdTools v1.1.1 (#69)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
jwaspin and J-Oliveros authored Dec 11, 2024
1 parent 706da9b commit bf264f3
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 14 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install Dependencies
run: npm install

- name: Build
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: docs
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-output
path: docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

- name: Create Tag
id: create_tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Read version from package.json
version=$(node -p "require('./package.json').version")
version_tag="v$version"
echo "Version from package.json: $version_tag"
echo "version=$version_tag" >> $GITHUB_OUTPUT
git tag $version_tag
git push origin $version_tag
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.create_tag.outputs.version }}
name: Release ${{ steps.create_tag.outputs.version }}
body: Automated release for version ${{ steps.create_tag.outputs.version }}.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 10 additions & 10 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "mdJSON Schema Viewer",
"name": "mdtools",
"description": "Visualize mdJSON schemas using D3.js",
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/adiwg/mdTools",
"repository": {
"type": "git",
Expand Down Expand Up @@ -33,11 +33,11 @@
"grunt-contrib-watch": "~1",
"grunt-env": "~0",
"grunt-preprocess": "~5",
"mdcodes": "2.9.0",
"mdjson-schemas": "2.9.0"
"mdcodes": "2.10.0",
"mdjson-schemas": "2.9.5"
},
"scripts": {
"build": "grunt prod",
"build": "npm install && grunt prod",
"deploy": "gh-pages -d docs",
"dev": "grunt dev",
"start": "grunt",
Expand Down

0 comments on commit bf264f3

Please sign in to comment.