Skip to content

Commit 044d595

Browse files
authored
chore: use git tags for plugins.json versioning (#397)
1 parent d75e35c commit 044d595

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/versioning.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ jobs:
99
steps:
1010
- name: Git checkout
1111
uses: actions/checkout@v2
12-
with:
13-
fetch-depth: 0
14-
# Updates the v* branch to reflect the content of the main branch
15-
# This allows versioning `plugins.json`, providing consumers use the
16-
# branch-specific deploy URL like
17-
# v*--netlify-plugins.netlify.app/plugins.json
12+
# Updates the list-v* git tag to version `plugins.json`.
13+
# Consumers must use the tag-specific deploy URL:
14+
# list-v*--netlify-plugins.netlify.app/plugins.json
15+
# This versions the syntax of `plugins.json`, not its contents.
16+
# The contents, i.e. the list of plugins, is versioned using the v*
17+
# git tag instead, which also comes with GitHub and npm releases.
18+
# For example:
19+
# - Changing a property name in `plugins.json` for all plugins
20+
# is a syntax breaking change (list-v* tag)
21+
# - Releasing a breaking change for a specific plugin in `plugins.json`
22+
# is a contents breaking change (v* tag + GitHub release + npm release)
1823
- name: Update branch
1924
run: |
20-
git branch -C main v1
21-
git push --force -u origin v1
25+
git tag --force list-v1
26+
git push --force --tags
2227
env:
2328
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)