Skip to content

Commit fd6f5d8

Browse files
committed
run detect on publish to publish-config branch
1 parent 9306aee commit fd6f5d8

1 file changed

Lines changed: 75 additions & 74 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 75 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- main
6+
- publish-config
67

78
env:
89
NPM_TAG: latest
@@ -41,78 +42,78 @@ jobs:
4142
echo "should_publish=true" >> "$GITHUB_OUTPUT"
4243
fi
4344
44-
- name: Set up Node.js for NPM
45-
uses: actions/setup-node@v6
46-
with:
47-
node-version: 24
48-
registry-url: "https://registry.npmjs.org"
49-
node-version-file: ".nvmrc"
50-
51-
- name: Install yarn
52-
if: steps.detect.outputs.should_publish == 'true'
53-
run: npm install -g yarn@^1.22.22
54-
55-
- name: Install dependencies
56-
if: steps.detect.outputs.should_publish == 'true'
57-
run: yarn install --ignore-engines
58-
env:
59-
NODE_OPTIONS: "--max_old_space_size=8192"
60-
61-
# - name: Update attributions.md
45+
# - name: Set up Node.js for NPM
46+
# uses: actions/setup-node@v6
47+
# with:
48+
# node-version: 24
49+
# registry-url: "https://registry.npmjs.org"
50+
# node-version-file: ".nvmrc"
51+
52+
# - name: Install yarn
53+
# if: steps.detect.outputs.should_publish == 'true'
54+
# run: npm install -g yarn@^1.22.22
55+
56+
# - name: Install dependencies
57+
# if: steps.detect.outputs.should_publish == 'true'
58+
# run: yarn install --ignore-engines
59+
# env:
60+
# NODE_OPTIONS: "--max_old_space_size=8192"
61+
62+
# # - name: Update attributions.md
63+
# # run: |
64+
# # git config --global user.email "TerriaBot@users.noreply.github.com"
65+
# # git config --global user.name "Terria Bot via GitHub Actions"
66+
# # yarn gulp code-attribution
67+
# # git add doc/acknowledgements/attributions.md
68+
# # if ! git diff --cached --quiet; then
69+
# # git commit -m "Update attributions.md for v${{ steps.detect.outputs.version }}"
70+
# # git push origin HEAD:${{ github.ref_name }}
71+
# # fi
72+
73+
# - name: Lint and build terriajs
74+
# if: steps.detect.outputs.should_publish == 'true'
75+
# run: npx gulp lint release
76+
# env:
77+
# NODE_OPTIONS: "--max_old_space_size=8192"
78+
79+
# - name: Publish package to NPM
80+
# if: steps.detect.outputs.should_publish == 'true'
81+
# run: npm publish --tag ${NPM_TAG}
82+
# env:
83+
# NODE_OPTIONS: "--max_old_space_size=8192"
84+
# NODE_AUTH_TOKEN: ""
85+
86+
# - name: Tag and push the new version to GitHub
87+
# if: steps.detect.outputs.should_publish == 'true'
6288
# run: |
63-
# git config --global user.email "TerriaBot@users.noreply.github.com"
64-
# git config --global user.name "Terria Bot via GitHub Actions"
65-
# yarn gulp code-attribution
66-
# git add doc/acknowledgements/attributions.md
67-
# if ! git diff --cached --quiet; then
68-
# git commit -m "Update attributions.md for v${{ steps.detect.outputs.version }}"
69-
# git push origin HEAD:${{ github.ref_name }}
70-
# fi
71-
72-
- name: Lint and build terriajs
73-
if: steps.detect.outputs.should_publish == 'true'
74-
run: npx gulp lint release
75-
env:
76-
NODE_OPTIONS: "--max_old_space_size=8192"
77-
78-
- name: Publish package to NPM
79-
if: steps.detect.outputs.should_publish == 'true'
80-
run: npm publish --tag ${NPM_TAG}
81-
env:
82-
NODE_OPTIONS: "--max_old_space_size=8192"
83-
NODE_AUTH_TOKEN: ""
84-
85-
- name: Tag and push the new version to GitHub
86-
if: steps.detect.outputs.should_publish == 'true'
87-
run: |
88-
git config user.name "Terria Bot via GitHub Actions"
89-
git config user.email "TerriaBot@users.noreply.github.com"
90-
git tag "${{ steps.detect.outputs.version }}"
91-
git push origin "${{ steps.detect.outputs.version }}"
92-
93-
# These slack success and failure message actions can be combined but it means there'll be no notification on a failed
94-
# action-detect-and-tag-new-version. It also allows for a bit better message customisation
95-
- name: Send success notification on Slack
96-
if: steps.detect.outputs.previous-version != steps.detect.outputs.current-version
97-
uses: 8398a7/action-slack@v3
98-
with:
99-
status: ${{ job.status }}
100-
fields: repo,commit,action,ref
101-
author_name: ${{ github.workflow }}
102-
mention: here
103-
if_mention: always
104-
text: ":white_check_mark: Published v${{ steps.detect.outputs.version }} to https://www.npmjs.com/package/terriajs"
105-
env:
106-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
107-
108-
- name: Send failure or cancellation notification on Slack
109-
if: failure() || cancelled() # Pick up events even if the job fails or is canceled.
110-
uses: 8398a7/action-slack@v3
111-
with:
112-
status: ${{ job.status }}
113-
fields: repo,commit,action,ref
114-
author_name: ${{ github.workflow }}
115-
mention: here
116-
if_mention: always
117-
env:
118-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
89+
# git config user.name "Terria Bot via GitHub Actions"
90+
# git config user.email "TerriaBot@users.noreply.github.com"
91+
# git tag "${{ steps.detect.outputs.version }}"
92+
# git push origin "${{ steps.detect.outputs.version }}"
93+
94+
# # These slack success and failure message actions can be combined but it means there'll be no notification on a failed
95+
# # action-detect-and-tag-new-version. It also allows for a bit better message customisation
96+
# - name: Send success notification on Slack
97+
# if: steps.detect.outputs.previous-version != steps.detect.outputs.current-version
98+
# uses: 8398a7/action-slack@v3
99+
# with:
100+
# status: ${{ job.status }}
101+
# fields: repo,commit,action,ref
102+
# author_name: ${{ github.workflow }}
103+
# mention: here
104+
# if_mention: always
105+
# text: ":white_check_mark: Published v${{ steps.detect.outputs.version }} to https://www.npmjs.com/package/terriajs"
106+
# env:
107+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
108+
109+
# - name: Send failure or cancellation notification on Slack
110+
# if: failure() || cancelled() # Pick up events even if the job fails or is canceled.
111+
# uses: 8398a7/action-slack@v3
112+
# with:
113+
# status: ${{ job.status }}
114+
# fields: repo,commit,action,ref
115+
# author_name: ${{ github.workflow }}
116+
# mention: here
117+
# if_mention: always
118+
# env:
119+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required

0 commit comments

Comments
 (0)