Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ jobs:
dry_run: true
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
branch_name: ${{ github.event.pull_request.head.ref }}
publish_package: false
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
secrets: inherit
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ jobs:
dry_run: false
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
branch_name: main
publish_package: false
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
secrets: inherit
19 changes: 10 additions & 9 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ on:
type: string
required: false
default: "0.18.0"
publish_package:
description: "Whether to publish a package to an npm registry"
required: true
type: boolean
publish_packages:
description: "comma separated list of package folders to publish to an npm registry"
required: false
type: string
default: ""
tag_format:
description: "The tag format to use for the release tags"
required: false
Expand Down Expand Up @@ -230,7 +231,7 @@ jobs:
name: config_artifact

- name: Cache asdf
if: ${{ inputs.publish_package }}
if: inputs.publish_packages != ''
uses: actions/cache@v5
with:
path: |
Expand All @@ -240,15 +241,15 @@ jobs:
${{ runner.os }}-asdf-

- name: Install asdf dependencies in .tool-versions
if: ${{ inputs.publish_package }}
if: inputs.publish_packages != ''
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
with:
asdf_version: ${{ inputs.asdfVersion }}
env:
PYTHON_CONFIGURE_OPTS: --enable-shared

- name: Install Dependencies and Build Package
if: ${{ inputs.publish_package }}
if: inputs.publish_packages != ''
run: |
make install
make build
Expand Down Expand Up @@ -314,7 +315,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
BRANCH_NAME: ${{ inputs.branch_name }}
PUBLISH_PACKAGE: ${{ inputs.publish_package }}
PUBLISH_PACKAGES: ${{ inputs.publish_packages }}
TAG_FORMAT: ${{ inputs.tag_format }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
MAIN_BRANCH: ${{ inputs.main_branch }}
Expand All @@ -325,7 +326,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUBLISH_PACKAGE: ${{ inputs.publish_package }}
PUBLISH_PACKAGES: ${{ inputs.publish_packages }}
TAG_FORMAT: ${{ inputs.tag_format }}
MAIN_BRANCH: ${{ inputs.main_branch }}
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}
Expand Down
9 changes: 7 additions & 2 deletions release.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const { readFileSync } = require("fs")

const commitTemplate = readFileSync("./releaseNotesTemplates/commit.hbs").toString()
const publish_package = process.env.PUBLISH_PACKAGE === "true"
const publish_packages = process.env.PUBLISH_PACKAGES?.split(",").map(s => s.trim()).filter(s => s.length > 0) || []
const mainBranch = process.env.MAIN_BRANCH || "main"

module.exports = {
Expand Down Expand Up @@ -67,7 +67,12 @@ module.exports = {
changelogFile: "CHANGELOG.md"
}
],
...(publish_package ? ["@semantic-release/npm"] : []),
...publish_packages.map(subpackage => [
"@semantic-release/npm",
{
pkgRoot: subpackage
}
]),
[
"@semantic-release/github",
{
Expand Down
5 changes: 4 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
sonar.organization=nhsdigital
sonar.projectKey=NHSDigital_eps-common-workflows
sonar.host.url=https://sonarcloud.io
sonar.host.url=https://sonarcloud.io

sonar.coverage.exclusions=\
release.config.cjs