Skip to content

Commit e77e825

Browse files
authored
Merge pull request #424 from atuttle/feature/release-automation
Release automation
2 parents 2dfc6fb + d18883d commit e77e825

24 files changed

+10954
-9
lines changed

.github/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ changelog:
33
labels:
44
- release-ignore
55
categories:
6-
- title: Breaking Changes 🛠
6+
- title: Breaking Changes ⚠️
77
labels:
88
- Semver-Major
99
- title: New Features 🎉
1010
labels:
1111
- Semver-Minor
12-
- title: Other Changes & Fixes
12+
- title: Bug Fixes 🐞
1313
labels:
1414
- Semver-Patch

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release New Version
2+
3+
# Based on: https://github.blog/2021-12-16-5-automations-every-developer-should-be-running/
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Largest semver bump of new version (major / minor / patch)'
10+
required: true
11+
type: choice
12+
options:
13+
- patch
14+
- minor
15+
- major
16+
17+
jobs:
18+
bump-version:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
# Check out the content (source branch). Use a deploy key so that
23+
# when we push changes, it will trigger the release workflow
24+
# run that runs on: tag. (Using the GitHub token would
25+
# not run the workflow to prevent infinite recursion.)
26+
- name: Check out source
27+
uses: actions/checkout@v2
28+
with:
29+
ssh-key: ${{ secrets.DEPLOY_KEY }}
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v2
33+
with:
34+
node-version: '16'
35+
36+
- name: Setup Git
37+
run: |
38+
git config user.name 'release-bot'
39+
git config user.email '[email protected]'
40+
41+
- name: bump version
42+
run: npm version ${{ github.event.inputs.version }}
43+
44+
- name: Push latest version
45+
run: git push origin main --follow-tags
46+
47+
- name: get-npm-version
48+
id: package-version
49+
uses: martinbeentjes/npm-get-version-action@master
50+
51+
- name: Create Release Notes
52+
uses: actions/[email protected]
53+
with:
54+
github-token: ${{secrets.GITHUB_TOKEN}}
55+
script: |
56+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
57+
tag_name: "v${{ steps.package-version.outputs.current-version }}",
58+
generate_release_notes: true
59+
});
60+
61+
- name: Cut a docs file for the new release
62+
run: |
63+
cat docs/@next.md | sed 's/@version@/${{ steps.package-version.outputs.current-version }}/gi' > docs/${{ steps.package-version.outputs.current-version }}.md
64+
git add docs/${{ steps.package-version.outputs.current-version }}.md
65+
cat docs/readme.md | sed 's/\<\!--new_docs_links_here--\>/\<\!--new_docs_links_here--\>\n\n- \[\v${{ steps.package-version.outputs.current-version }}]\(${{ steps.package-version.outputs.current-version }}.md\)/g' > docs/readme.md
66+
git add docs/readme.md
67+
git commit -m"New doc file ${{ steps.package-version.outputs.current-version }}.md"
68+
git push

CONTRIBUTING.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Guidelines for Contributing to Taffy
1+
# Contributing to Taffy
22

33
Contributions of all shapes and sizes are welcome, encouraged, and greatly appreciated! Not sure where to start? [Learn how here!](https://makeapullrequest.com)
44

@@ -8,19 +8,22 @@ For all contributions, you'll need a [free GitHub account](https://github.com/jo
88

99
Please include all of the following information in your ticket:
1010

11-
- CFML Platform and version (e.g. Adobe ColdFusion 9.0.2, Lucee 4.5.0)
12-
- Java version (look it up in CF Administrator, or do `java -version` at the command line)
11+
- CFML Platform and version (e.g. Adobe ColdFusion 9.0.2, or Lucee 4.5.0)
12+
- Java version (look it up in Lucee/CF Administrator, or do `java -version` at the command line)
1313
- Taffy version (for bugs)
1414

1515
## Documentation
1616

17-
Documentation is managed [in its own repository](https://github.com/atuttle/TaffyDocs) and changes are automatically published once they are merged into the `main` branch.
17+
Documentation is in the `/docs` folder.
1818

19-
There's no such thing as perfect documentation. It can never be thorough enough, never perfectly organized. If you find something confusing or outdated, please be so kind as to file a bug report for it, if you can't or won't fix it. (Yes, documentation bugs!)
19+
- When fixing a bug for an existing version, if it necessitates a docs update, be sure to update the correct version's markdown file.
20+
- When adding a new feature, make the appropriate updates to `@next.md`. This file will be used to generate the new version file at release time.
21+
22+
✨ There's no such thing as perfect documentation! It can never be thorough enough, nor ever perfectly organized. If you find something confusing or outdated, please be so kind as to file a bug report for it, if you can't or won't fix it. (Yes, documentation bugs!)
2023

2124
## Code
2225

23-
Starting with the development of Taffy 1.4, all new development will be done against the `main` branch. When you want to make a change and submit it for the Bleeding Edge Release (BER), do the following:
26+
All new development is done against the `main` branch. When you want to make a change and submit it for the Bleeding Edge Release (BER), do the following:
2427

2528
1. [Fork the project](https://github.com/atuttle/Taffy/fork_select)
2629
1. Clone to your local machine: `git clone https://github.com/YOUR-GITHUB-USERNAME/Taffy.git`
@@ -29,7 +32,7 @@ Starting with the development of Taffy 1.4, all new development will be done aga
2932
1. Push your changes back to your fork. `git push -u origin BRANCH_NAME`
3033
1. Send a pull request ([Learn how here!](https://makeapullrequest.com))
3134

32-
- Please make sure you select `main` as the destination branch
35+
- Please make sure you select `atuttle/main` as the destination branch
3336

3437
### Styling changes
3538

@@ -40,6 +43,8 @@ Taffy uses LessCSS to style the dashboard and documentation. To compile changes
4043

4144
### Tests
4245

46+
_⚠️ Unfortunately our test suite doesn't currently run. We're [working on getting it setup on GitHub Actions](https://github.com/atuttle/Taffy/issues/415) and your help doing so would be greatly appreciated._
47+
4348
If at all possible, please include test cases for anything you add or change. To run the tests, you must have [MxUnit](https://mxunit.org/) installed at `/mxunit` (not just a global mapping, put the folder in your web-root, as there are CSS/JS/etc assets that will be needed).
4449

4550
1. Clone the Taffy repo to `/taffy` in your web root.

docs/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)