Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update semantic-release packages and related workflows #349

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/if-nodejs-version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository (@latest tag -> master branch)
if: "!contains(github.event.release.tag_name, 'next')"
uses: actions/checkout@v2
with:
ref: master
- name: Checkout repository (@next tag -> next branch)
if: "contains(github.event.release.tag_name, 'next')"
uses: actions/checkout@v2
with:
ref: next
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
# in case release is created from release branch then we need to checkout from given branch
# if @semantic-release/github is used to publish, the minimum version is 7.2.0 for proper working
ref: ${{ github.event.release.target_commitish }}
- name: Check if Node.js project and has package.json
id: packagejson
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/release-wc-and-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ jobs:
name: Release Web-component
runs-on: ubuntu-latest
steps:
- name: Checkout repository (@latest tag -> master branch)
if: "!contains(github.event.release.tag_name, 'next')"
uses: actions/checkout@v2
with:
ref: master
- name: Checkout repository (@next tag -> next branch)
if: "contains(github.event.release.tag_name, 'next')"
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: next
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
# in case release is created from release branch then we need to checkout from given branch
# if @semantic-release/github is used to publish, the minimum version is 7.2.0 for proper working
ref: ${{ github.event.release.target_commitish }}
- name: Setup Node.js
uses: actions/setup-node@v1
with:
Expand All @@ -36,14 +33,14 @@ jobs:
# When adding "bump:version" script in package.json, make sure --allow-same-version is set in case someone forgot and updated package.json manually and we want to avoide this action to fail and raise confusion
run: VERSION=${{github.event.release.tag_name}} npm run bump:webcomp:version
- name: Release web-component to NPM (@latest tag)
if: "!contains(github.event.release.tag_name, 'next')"
if: github.event.release.target_commitish != 'next'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./web-component/package.json
access: public
- name: Release web-component to NPM (@next tag)
if: "contains(github.event.release.tag_name, 'next')"
if: github.event.release.target_commitish == 'next'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
Expand All @@ -53,7 +50,7 @@ jobs:

playground:
name: Release Playground
if: "!contains(github.event.release.tag_name, 'next')"
if: github.event.release.target_commitish != 'next'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
/**/dist
/library/browser
/library/styles
/library/LICENSE
/library/README.md

# misc
.DS_Store
Expand Down
Loading