-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/prefixed-archives
- Loading branch information
Showing
14 changed files
with
18,421 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Lint documentation | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.md' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
wp-scripts-lint: | ||
uses: inpsyde/reusable-workflows/.github/workflows/wp-scripts-lint.yml@main | ||
with: | ||
LINT_TOOLS: '["md-docs"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
name: Automatic Release | ||
on: | ||
workflow_call: | ||
inputs: | ||
NPM_REGISTRY_DOMAIN: | ||
description: Domain of the private npm registry. | ||
default: https://npm.pkg.github.com/ | ||
required: false | ||
type: string | ||
secrets: | ||
NPM_REGISTRY_TOKEN: | ||
description: Authentication for the private npm registry. | ||
required: false | ||
GITHUB_USER_EMAIL: | ||
description: Email address for the GitHub user configuration. | ||
required: false | ||
GITHUB_USER_NAME: | ||
description: Username for the GitHub user configuration. | ||
required: false | ||
GITHUB_USER_SSH_KEY: | ||
description: Private SSH key associated with the GitHub user for the token passed as `GITHUB_USER_TOKEN`. | ||
required: false | ||
GITHUB_USER_SSH_PUBLIC_KEY: | ||
description: Public SSH key associated with the GitHub user for the token passed as `GITHUB_USER_TOKEN`. | ||
required: false | ||
GITHUB_USER_TOKEN: | ||
description: Authentication token with write permission needed by the release bot (falls back to GITHUB_TOKEN). | ||
description: Authentication token with write permission needed by the release bot (falls back to `GITHUB_TOKEN`). | ||
required: false | ||
|
||
jobs: | ||
|
@@ -13,6 +34,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
HAS_CONFIG: false | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} | ||
GITHUB_USER_SSH_KEY: ${{ secrets.GITHUB_USER_SSH_KEY }} | ||
GITHUB_USER_SSH_PUBLIC_KEY: ${{ secrets.GITHUB_USER_SSH_PUBLIC_KEY }} | ||
steps: | ||
- name: Fetch semantic-release Node version | ||
uses: actions/checkout@v4 | ||
|
@@ -23,10 +47,11 @@ jobs: | |
sparse-checkout-cone-mode: false | ||
path: semantic-release-repo | ||
|
||
- name: Setup Node.js | ||
- name: Set up node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: semantic-release-repo/package.json | ||
registry-url: ${{ inputs.NPM_REGISTRY_DOMAIN }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -40,7 +65,25 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
ssh-key: ${{ env.GITHUB_USER_SSH_KEY }} | ||
|
||
- name: Set up SSH | ||
if: ${{ env.GITHUB_USER_SSH_KEY != '' }} | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ env.GITHUB_USER_SSH_KEY }} | ||
|
||
- name: Set up signing commits | ||
if: ${{ env.GITHUB_USER_SSH_PUBLIC_KEY != '' }} | ||
run: | | ||
: # Create empty SSH private key file so Git does not complain. | ||
touch "${{ runner.temp }}/signingkey" | ||
echo "${{ env.GITHUB_USER_SSH_PUBLIC_KEY }}" > "${{ runner.temp }}/signingkey.pub" | ||
git config --global commit.gpgsign true | ||
git config --global gpg.format ssh | ||
git config --global user.signingkey "${{ runner.temp }}/signingkey.pub" | ||
- name: Check presence of release.config.js | ||
run: | | ||
|
@@ -67,7 +110,23 @@ jobs: | |
run: | | ||
rm -rf workflow-repo | ||
- name: Set up release environment variables | ||
env: | ||
GITHUB_USER_EMAIL: ${{ secrets.GITHUB_USER_EMAIL }} | ||
GITHUB_USER_NAME: ${{ secrets.GITHUB_USER_NAME }} | ||
run: | | ||
${{ env.GITHUB_USER_EMAIL != '' }} && echo "GIT_AUTHOR_EMAIL=${{ env.GITHUB_USER_EMAIL }}" >> $GITHUB_ENV || true | ||
${{ env.GITHUB_USER_NAME != '' }} && echo "GIT_AUTHOR_NAME=${{ env.GITHUB_USER_NAME }}" >> $GITHUB_ENV || true | ||
${{ env.GITHUB_USER_EMAIL != '' }} && echo "GIT_COMMITTER_EMAIL=${{ env.GITHUB_USER_EMAIL }}" >> $GITHUB_ENV || true | ||
${{ env.GITHUB_USER_NAME != '' }} && echo "GIT_COMMITTER_NAME=${{ env.GITHUB_USER_NAME }}" >> $GITHUB_ENV || true | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_USER_TOKEN != '' && secrets.GITHUB_USER_TOKEN || secrets.GITHUB_TOKEN }} | ||
run: npx semantic-release | ||
|
||
- name: Delete signing key files | ||
if: ${{ always() && env.GITHUB_USER_SSH_PUBLIC_KEY != '' }} | ||
run: | | ||
rm -f "${{ runner.temp }}/signingkey" | ||
rm -f "${{ runner.temp }}/signingkey.pub" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
## PhpStorm | ||
.idea/ | ||
|
||
## npm | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.