ci: fetch tags for proper version bump

This commit is contained in:
pooya parsa 2020-03-03 14:05:52 +01:00
parent 23f3b0b40c
commit 0ff9b59e93
2 changed files with 19 additions and 12 deletions

View File

@ -8,10 +8,12 @@ jobs:
nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@2
with:
ref: 'refs/heads/dev'
fetch-depth: 0 # All history
- name: fetch tags
run: git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"
- uses: actions/setup-node@v1
with:
node-version: 12
@ -38,20 +40,22 @@ jobs:
run: yarn lerna version --yes --no-changelog --no-git-tag-version --no-push --force-publish "*" --loglevel verbose
- name: build
run: PACKAGE_SUFFIX=edge yarn build
# - name: publish
# run: ./scripts/workspace-run npm publish -q
# env:
# NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
- name: publish
run: ./scripts/workspace-run npm publish -q
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
# Anchors still not supported :(
# https://github.community/t5/GitHub-Actions/Support-for-YAML-anchors/td-p/30336
nightly-next:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@2
with:
ref: 'refs/heads/next'
fetch-depth: 0 # All history
- name: fetch tags
run: git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"
- uses: actions/setup-node@v1
with:
node-version: 12
@ -78,9 +82,9 @@ jobs:
run: yarn lerna version --yes --no-changelog --no-git-tag-version --no-push --force-publish "*" --loglevel verbose
- name: build
run: PACKAGE_SUFFIX=edge yarn build
# - name: publish
# run: ./scripts/workspace-run npm publish --tag next -q
# env:
# NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
- name: publish
run: ./scripts/workspace-run npm publish --tag next -q
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

View File

@ -29,9 +29,12 @@ jobs:
node-version: ${{ matrix.node }}
- name: checkout
uses: actions/checkout@master
uses: actions/checkout@2
with:
fetch-depth: 100
fetch-depth: 0 # All history
- name: fetch tags
run: git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"
- name: cache node_modules
id: node_modules_cache_id