Skip to content

Commit 0ff9b59

Browse files
author
pooya parsa
committed
ci: fetch tags for proper version bump
1 parent 23f3b0b commit 0ff9b59

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.github/workflows/nightly.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ jobs:
88
nightly:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@master
11+
- uses: actions/checkout@2
1212
with:
1313
ref: 'refs/heads/dev'
1414
fetch-depth: 0 # All history
15+
- name: fetch tags
16+
run: git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"
1517
- uses: actions/setup-node@v1
1618
with:
1719
node-version: 12
@@ -38,20 +40,22 @@ jobs:
3840
run: yarn lerna version --yes --no-changelog --no-git-tag-version --no-push --force-publish "*" --loglevel verbose
3941
- name: build
4042
run: PACKAGE_SUFFIX=edge yarn build
41-
# - name: publish
42-
# run: ./scripts/workspace-run npm publish -q
43-
# env:
44-
# NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
43+
- name: publish
44+
run: ./scripts/workspace-run npm publish -q
45+
env:
46+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
4547

4648
# Anchors still not supported :(
4749
# https://github.community/t5/GitHub-Actions/Support-for-YAML-anchors/td-p/30336
4850
nightly-next:
4951
runs-on: ubuntu-latest
5052
steps:
51-
- uses: actions/checkout@master
53+
- uses: actions/checkout@2
5254
with:
5355
ref: 'refs/heads/next'
5456
fetch-depth: 0 # All history
57+
- name: fetch tags
58+
run: git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"
5559
- uses: actions/setup-node@v1
5660
with:
5761
node-version: 12
@@ -78,9 +82,9 @@ jobs:
7882
run: yarn lerna version --yes --no-changelog --no-git-tag-version --no-push --force-publish "*" --loglevel verbose
7983
- name: build
8084
run: PACKAGE_SUFFIX=edge yarn build
81-
# - name: publish
82-
# run: ./scripts/workspace-run npm publish --tag next -q
83-
# env:
84-
# NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
85+
- name: publish
86+
run: ./scripts/workspace-run npm publish --tag next -q
87+
env:
88+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
8589

8690

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ jobs:
2929
node-version: ${{ matrix.node }}
3030

3131
- name: checkout
32-
uses: actions/checkout@master
32+
uses: actions/checkout@2
3333
with:
34-
fetch-depth: 100
34+
fetch-depth: 0 # All history
35+
36+
- name: fetch tags
37+
run: git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"
3538

3639
- name: cache node_modules
3740
id: node_modules_cache_id

0 commit comments

Comments
 (0)