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: fix checkout to next branch #325

Merged
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: 8 additions & 3 deletions .github/workflows/if-nodejs-version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ jobs:
name: Generate assets and bump
runs-on: ubuntu-latest
steps:
- name: Checkout repo
- name: Checkout repository (@latest tag -> master branch)
if: "!contains(github.event.release.tag_name, 'next')"
uses: actions/checkout@v2
with:
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
ref: ${{ github.event.release.target_commitish }}
ref: master
- name: Checkout repository (@next tag -> next branch)
if: "contains(github.event.release.tag_name, 'next')"
uses: actions/checkout@v2
with:
ref: next
- 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: 11 additions & 8 deletions .github/workflows/release-wc-and-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ jobs:
name: Release Web-component
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- 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:
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
ref: ${{ github.event.release.target_commitish }}
ref: next
- name: Setup Node.js
uses: actions/setup-node@v1
with:
Expand All @@ -31,26 +36,24 @@ 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: github.event.release.target_commitish == 'master'
if: "!contains(github.event.release.tag_name, '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: github.event.release.target_commitish == 'next'
if: "contains(github.event.release.tag_name, 'next')"
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./web-component/package.json
access: public
tag: next


playground:
name: Release Playground
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
if: github.event.release.target_commitish == 'master'
if: "!contains(github.event.release.tag_name, 'next')"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down