Skip to content

Commit d54d9fe

Browse files
author
Brittany Jones
committed
Release workflow cleanup and documentation updates
1 parent 8a97d65 commit d54d9fe

File tree

12 files changed

+868
-31
lines changed

12 files changed

+868
-31
lines changed

.github/workflows/check_changelog.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ jobs:
88
check-changelog:
99
runs-on: ubuntu-latest
1010
if: |
11-
!contains(github.event.pull_request.body, '[skip changelog]') &&
12-
!contains(github.event.pull_request.body, '[changelog skip]') &&
13-
!contains(github.event.pull_request.body, '[skip ci]') &&
14-
!contains(github.event.pull_request.labels.*.name, 'skip changelog') &&
15-
!contains(github.event.pull_request.labels.*.name, 'dependencies')
11+
contains(github.event.pull_request.head.ref, 'release-')
1612
steps:
1713
- uses: actions/checkout@v4
1814
- name: Check that CHANGELOG is touched

.github/workflows/publish.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Publish to NPM and Change Management
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Create Github Tag and Release"]
6+
types:
7+
- completed
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: write
13+
actions: read
14+
id-token: write
15+
16+
jobs:
17+
check_for_moratorium:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
runs-on: ubuntu-latest
20+
environment: change_management
21+
steps:
22+
- uses: actions/checkout@v4
23+
- env:
24+
TPS_API_TOKEN: ${{ secrets.TPS_API_TOKEN_PARAM }}
25+
run: ./scripts/release/tps-check-lock heroku-applink-nodejs ${{ github.sha }}
26+
27+
publish:
28+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
29+
needs: check_for_moratorium
30+
runs-on: ubuntu-latest
31+
environment: change_management
32+
permissions:
33+
id-token: write
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
38+
- name: Use Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: "20.x"
42+
registry-url: "https://registry.npmjs.org"
43+
44+
- name: Get the latest tag
45+
id: get_tag
46+
run: |
47+
TAG=$(git describe --tags --abbrev=0)
48+
echo "tag=$TAG" >> $GITHUB_OUTPUT
49+
echo "Using tag: $TAG"
50+
51+
- name: Checkout the tagged version
52+
run: |
53+
git checkout ${{ steps.get_tag.outputs.tag }}
54+
55+
- name: Install dependencies
56+
run: npm ci
57+
58+
- name: Build the project
59+
run: npm run build
60+
61+
- name: Publish to npm
62+
run: npm publish
63+
env:
64+
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_AUTOMATION_TOKEN }}
65+
66+
- name: Publish To Change Management
67+
env:
68+
ACTOR_EMAIL: ${{ secrets.TPS_API_RELEASE_ACTOR_EMAIL }}
69+
TPS_API_TOKEN: ${{ secrets.TPS_API_TOKEN_PARAM }}
70+
# Failure to record the release should not fail the workflow for now.
71+
continue-on-error: true
72+
run: ./scripts/release/tps-record-release heroku-applink-nodejs ${{ github.sha }}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Create Github Tag and Release
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Test, Lint, and Build"]
6+
types:
7+
- completed
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: write
13+
actions: read
14+
id-token: write
15+
16+
jobs:
17+
push-git-tag:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_commit.message, 'Merge pull request') && contains(github.event.workflow_run.head_commit.message, 'release-v') }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- uses: actions/setup-java@v4 # java required for testing with wiremock
28+
with:
29+
java-package: jre
30+
java-version: "11"
31+
distribution: "zulu"
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
cache: "npm"
36+
- run: npm install
37+
- run: npm run build
38+
39+
- name: Extract version from branch name
40+
id: version
41+
run: |
42+
VERSION=$(echo "${{ github.event.workflow_run.head_commit.message }}" | grep -o 'release-v[0-9]\+\.[0-9]\+\.[0-9]\+' | sed 's/release-v//')
43+
echo "version=$VERSION" >> $GITHUB_OUTPUT
44+
echo "Extracted version: $VERSION"
45+
46+
- name: Configure Git
47+
run: |
48+
git config --global user.name "GitHub Actions"
49+
git config --global user.email "github-actions@github.com"
50+
51+
- name: Create and push Github tag
52+
run: |
53+
echo "Creating tag v${{ steps.version.outputs.version }}"
54+
git tag -s "v${{ steps.version.outputs.version }}" -m "Release v${{ steps.version.outputs.version }}"
55+
echo "Pushing tag to origin..."
56+
git push origin "v${{ steps.version.outputs.version }}"
57+
echo "Verifying tag was pushed:"
58+
git ls-remote --tags origin "v${{ steps.version.outputs.version }}"
59+
60+
- name: Get tag name
61+
id: get_tag
62+
run: |
63+
TAG=$(git describe --tags --abbrev=0)
64+
echo "tag=$TAG" >> $GITHUB_OUTPUT
65+
echo "Using tag: $TAG"
66+
67+
- name: Create GitHub Release
68+
uses: softprops/action-gh-release@v2
69+
with:
70+
tag_name: ${{ steps.get_tag.outputs.tag }}
71+
generate_release_notes: true

.github/workflows/build.yml renamed to .github/workflows/test-lint-build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
name: Build
1+
name: Test, Lint, and Build
2+
23
on:
34
push:
4-
# Avoid duplicate builds on PRs.
5-
branches:
6-
- main
5+
branches: [main]
76
pull_request:
87
permissions:
98
contents: read

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ src/**/*.js
77
src/**/*.js.map
88
**/coverage/
99
**/.nyc_output
10+
11+
# Salesforce
12+
.codegenie/
13+
14+
# Heroku TPS TEMP
15+
tpsGetLock_response.txt
16+
tpsRecordRelease_response.txt

CHANGELOG.md

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,56 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
4+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
35

4-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
## [1.0.0-ea.2](https://github.com/heroku/heroku-applink-nodejs/compare/v1.0.0-ea.1...v1.0.0-ea.2) - 2025-06-20
67

8+
### Changes
79

8-
## [0.1.0-ea] - 2024-08-12
10+
### Features
11+
* Add X-Request-Id header
12+
* Extract User-Agent header from package.json
13+
* Add GitHub pull request template
14+
15+
### Fixes
16+
* Fix Java heap memory test issue
17+
18+
### Docs
19+
* Update HttpRequestUtil.request documentation
20+
* Update license year
21+
22+
### Other
23+
* Rename HTTPResponseError -> HttpResponseError
24+
25+
## [1.0.0-ea.1](https://github.com/heroku/heroku-applink-nodejs/compare/v1.0.0-ea.0...v1.0.0-ea.1) - 2025-06-06
26+
27+
### Changes
928

10-
- Initial
29+
### Other
30+
* Remove dynamic UA
1131

12-
## [1.0.0-ea] - 2025-06-05
13-
- Update CODEOWNERS
14-
- Updated `getAuthorization` to use the correct API URL.
15-
- Rename `getConnection(name: string)` -> `getAuthorization(developerName: string, attachmentNameOrColorUrl = "HEROKU_APPLINK")`, accepting a new attachmentNameOrColorOrUrl to use a specific Applink addon's config.
16-
- Remove node-fetch in favor of native fetch, add `HTTPResponseError`
32+
## [1.0.0-ea.0](https://github.com/heroku/heroku-applink-nodejs/compare/v1.0.0-ea...v1.0.0-ea.0) - 2025-06-06
1733

18-
## [1.0.0-ea.0] - 2025-06-06
19-
- Add `X-App-UUID` header, `heroku-applink-node-sdk` UA.
34+
### Changes
35+
36+
### Features
37+
* Add X-App-UUID header, heroku-applink-node-sdk UA
38+
39+
## [1.0.0-ea](https://github.com/heroku/heroku-applink-nodejs/compare/v0.1.0-ea...v1.0.0-ea) - 2025-06-05
40+
41+
### Changes
42+
43+
### Features
44+
* Updated getAuthorization to use the correct API URL
45+
* Rename getConnection(name: string) -> getAuthorization(developerName: string, attachmentNameOrColorUrl = "HEROKU_APPLINK"), accepting a new attachmentNameOrColorOrUrl to use a specific Applink addon's config
46+
* Remove node-fetch in favor of native fetch, add HTTPResponseError
47+
48+
### Other
49+
* Update CODEOWNERS
50+
51+
## [0.1.0-ea] - 2024-08-12
2052

21-
## [1.0.0-ea.1] - 2025-06-06
22-
- Remove dynamic UA.
53+
### Changes
2354

24-
## [1.0.0-ea.2] - 2025-06-20
25-
- Update `HttpRequestUtil.request` documentation
26-
- Update license year
27-
- Add `X-Request-Id` header
28-
- Extract `User-Agent` header from package.json
29-
- Rename `HTTPResponseError` -> `HttpResponseError`
30-
- Add GitHub pull request template
31-
- Fix Java heap memory test issue
55+
### Features
56+
* Initial release

bin/publish.sh

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ echo "Running npm publish..."
55
npm publish
66

77
echo "Creating git tag..."
8-
git tag "v${version}"
8+
git tag -s "v${version}"
99
git push --tags

0 commit comments

Comments
 (0)