Skip to content

Commit 887e147

Browse files
committed
Run publish workflow only on tags
1 parent cba629d commit 887e147

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Publish
22

33
on: # publish when main branch changes
44
push:
5-
branches:
6-
- main
5+
tags:
6+
- '*'
77

88
jobs:
99
publish:

README.dev.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ npx husky install
8989
This app is published using [GitHub pages](https://github.com/citation-file-format/cff-initializer-javascript/settings/pages) automatically by the [Publish workflow](.github/workflows/publish.yml).
9090
The way this works is:
9191

92-
- After a commit is pushed to `main`, the workflow runs.
92+
- After a new tag is created, the workflow runs.
9393
- The workflow builds the app (using the `npm run build` command) into the folder `./dist`.
9494
- The GitHub action `peaceiris/actions-gh-pages@v3` pushes the contents of `./dist` to the branch [gh-pages](https://github.com/citation-file-format/cff-initializer-javascript/tree/gh-pages).
9595
- The `gh-pages` content is served by GitHub into <https://citation-file-format.github.io/cff-initializer-javascript/#/>
@@ -146,14 +146,13 @@ This section describes how to make a release in 2 parts:
146146
6. By running `npm run lint` make sure the linter does not complain
147147
7. Run the unit tests with `npm run test:unit:ci`
148148
8. Make sure that github.io page is up to date
149-
9. Check whether the [Publish](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/publish.yml) workflow worked recently and it was successful
150149

151150
### (2/2) GitHub
152151

153152
1. Make a [release on GitHub](https://github.com/citation-file-format/cff-initializer-javascript/releases/new).
154153
2. Check whether the [zenodraft](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/zenodraft.yml) workflow was triggered correctly by the GitHub release.
155154
3. Go to Zenodo, log in, inspect the draft release. If all looks good, click "Publish" in Zenodo's frontend.
156-
155+
4. Check that the [Publish](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/publish.yml) workflow ran for the new tag and it was successful.
157156

158157
## References
159158

0 commit comments

Comments
 (0)