Skip to content

Commit 5620bb8

Browse files
committed
Simplified CI
1 parent e7536ce commit 5620bb8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
versionSpec: '5.12.x'
1515
- uses: gittools/actions/gitversion/execute@v0.10.2
1616
id: gitversion
17-
- if: steps.gitversion.outputs.preReleaseLabel != ''
17+
- if: github.ref_type != 'tag'
1818
run: npm version --no-git-tag-version ${{steps.gitversion.outputs.nuGetVersion}}-${{steps.gitversion.outputs.shortSha}}
19-
- if: steps.gitversion.outputs.preReleaseLabel == ''
19+
- if: github.ref_type == 'tag'
2020
run: npm version --no-git-tag-version ${{steps.gitversion.outputs.nuGetVersion}}
2121

2222
# Build
@@ -27,7 +27,7 @@ jobs:
2727

2828
# Release
2929
- name: Create GitHub Release
30-
if: steps.gitversion.outputs.preReleaseLabel == ''
30+
if: github.ref_type == 'tag'
3131
uses: actions/create-release@v1
3232
with:
3333
tag_name: ${{github.ref}}
@@ -37,20 +37,20 @@ jobs:
3737

3838
# Publish (release only)
3939
- name: Publish documentation
40-
if: steps.gitversion.outputs.preReleaseLabel == ''
40+
if: github.ref_type == 'tag'
4141
uses: peaceiris/actions-gh-pages@v3
4242
with:
4343
github_token: ${{github.token}}
4444
force_orphan: true
4545
publish_dir: docs
4646
cname: typescript.typedrest.net
4747
- name: Connect to registry (npmjs.com)
48-
if: steps.gitversion.outputs.preReleaseLabel == ''
48+
if: github.ref_type == 'tag'
4949
uses: actions/setup-node@v3
5050
with:
5151
registry-url: https://registry.npmjs.org
5252
- name: Publish packages (npmjs.com)
53-
if: steps.gitversion.outputs.preReleaseLabel == ''
53+
if: github.ref_type == 'tag'
5454
run: npm publish --access public
5555
env:
5656
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -63,7 +63,7 @@ jobs:
6363
registry-url: https://npm.pkg.github.com/
6464
scope: '@typedrest'
6565
- name: Publish packages (GitHub)
66-
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/renovate/')
66+
if: github.event_name == 'push' && !startsWith(github.ref_name, 'renovate/')
6767
run: |
6868
sed -i 's|"typedrest"|"@typedrest/typedrest"|g' package.json
6969
npm publish

0 commit comments

Comments
 (0)