ep_disable_reset_authorship_colours 0.0.57 → 0.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,12 @@ name: Dependabot Automerge
|
|
|
2
2
|
permissions:
|
|
3
3
|
contents: write
|
|
4
4
|
pull-requests: write
|
|
5
|
+
# `actions: write` lets the post-merge step kick off Node.js Package on
|
|
6
|
+
# the default branch via `gh workflow run`. Without this, automerge'd
|
|
7
|
+
# PRs land on main but the on-push release job never fires (GitHub
|
|
8
|
+
# Actions intentionally suppresses on:push triggers when the push is
|
|
9
|
+
# authenticated with GITHUB_TOKEN).
|
|
10
|
+
actions: write
|
|
5
11
|
on:
|
|
6
12
|
workflow_run:
|
|
7
13
|
workflows:
|
|
@@ -21,6 +27,7 @@ jobs:
|
|
|
21
27
|
uses: actions/checkout@v6
|
|
22
28
|
|
|
23
29
|
- name: Automerge
|
|
30
|
+
id: automerge
|
|
24
31
|
uses: "pascalgn/automerge-action@v0.16.4"
|
|
25
32
|
env:
|
|
26
33
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -28,3 +35,11 @@ jobs:
|
|
|
28
35
|
MERGE_LABELS: ""
|
|
29
36
|
MERGE_RETRY_SLEEP: "100000"
|
|
30
37
|
|
|
38
|
+
- name: Trigger release on default branch
|
|
39
|
+
# `pascalgn/automerge-action` exits 0 whether or not it merged. Skip
|
|
40
|
+
# the dispatch when nothing was actually merged so we don't kick a
|
|
41
|
+
# phantom release run on every Dependabot Automerge invocation.
|
|
42
|
+
if: steps.automerge.outputs.mergeResult == 'merged'
|
|
43
|
+
env:
|
|
44
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
45
|
+
run: gh workflow run test-and-release.yml --ref ${{ github.event.repository.default_branch }}
|
|
@@ -53,10 +53,21 @@ jobs:
|
|
|
53
53
|
fetch-depth: 0
|
|
54
54
|
-
|
|
55
55
|
name: Bump version (patch)
|
|
56
|
+
id: bump
|
|
56
57
|
run: |
|
|
57
58
|
LATEST_TAG=$(git describe --tags --abbrev=0) || exit 1
|
|
58
59
|
NEW_COMMITS=$(git rev-list --count "${LATEST_TAG}"..) || exit 1
|
|
59
|
-
|
|
60
|
+
# No new commits since the last tag → nothing to publish.
|
|
61
|
+
# Setting `bumped=false` lets the publish step below skip
|
|
62
|
+
# itself instead of trying to republish the existing version
|
|
63
|
+
# (which fails with "cannot publish over previously published
|
|
64
|
+
# versions"). Only manual `gh workflow run` invocations on a
|
|
65
|
+
# tag-current branch hit this path; on:push always sees ≥1
|
|
66
|
+
# new commit because the push event is what triggered us.
|
|
67
|
+
if [ "${NEW_COMMITS}" -le 0 ]; then
|
|
68
|
+
echo "bumped=false" >> "${GITHUB_OUTPUT}"
|
|
69
|
+
exit 0
|
|
70
|
+
fi
|
|
60
71
|
git config user.name 'github-actions[bot]'
|
|
61
72
|
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
|
62
73
|
pnpm i --frozen-lockfile
|
|
@@ -84,9 +95,11 @@ jobs:
|
|
|
84
95
|
# rejects the tag push too, and the next workflow tick can retry
|
|
85
96
|
# cleanly against the up-to-date refs.
|
|
86
97
|
git push --atomic origin "${GITHUB_REF_NAME}" "${NEW_TAG}"
|
|
98
|
+
echo "bumped=true" >> "${GITHUB_OUTPUT}"
|
|
87
99
|
# This is required if the package has a prepare script that uses something
|
|
88
100
|
# in dependencies or devDependencies.
|
|
89
101
|
-
|
|
102
|
+
if: steps.bump.outputs.bumped == 'true'
|
|
90
103
|
run: pnpm i
|
|
91
104
|
# `npm publish` must come after `git push` otherwise there is a race
|
|
92
105
|
# condition: If two PRs are merged back-to-back then master/main will be
|
|
@@ -104,4 +117,5 @@ jobs:
|
|
|
104
117
|
# whichever `npm` is on PATH; calling `npm` directly avoids any shim
|
|
105
118
|
# ambiguity.
|
|
106
119
|
- name: Publish to npm via OIDC
|
|
120
|
+
if: steps.bump.outputs.bumped == 'true'
|
|
107
121
|
run: npm publish --provenance --access public
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
name: Node.js Package
|
|
2
|
-
on:
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
# Invoked by automerge.yml after a Dependabot PR is merged. GitHub
|
|
5
|
+
# Actions doesn't fire on:push when the push is authored by GITHUB_TOKEN
|
|
6
|
+
# (the automerge action's only available identity), so without this
|
|
7
|
+
# dispatch trigger the release job never runs after auto-merges.
|
|
8
|
+
workflow_dispatch:
|
|
3
9
|
|
|
4
10
|
# id-token: write must be granted here so the reusable npmpublish workflow
|
|
5
11
|
# can request an OIDC token for npm trusted publishing.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep_disable_reset_authorship_colours",
|
|
3
3
|
"description": "Disable The reset authorship colours button",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.59",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/ether/ep_disable_reset_authorship_colours.git"
|