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

chore: update package.json and GitHub Workflows #338

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/if-nodejs-release.yml
Expand Up @@ -39,14 +39,14 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- 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"
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
shell: bash
- if: steps.packagejson.outputs.exists == 'true'
name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
Expand Down Expand Up @@ -77,13 +77,13 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- 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"
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
- if: steps.packagejson.outputs.exists == 'true'
name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
- if: steps.packagejson.outputs.exists == 'true'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/if-nodejs-version-bump.yml
Expand Up @@ -15,18 +15,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# 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"
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
- if: steps.packagejson.outputs.exists == 'true'
name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
Expand All @@ -45,7 +45,7 @@ jobs:
run: VERSION=${{github.event.release.tag_name}} npm run bump:version
- if: steps.packagejson.outputs.exists == 'true'
name: Create Pull Request with updated asset files including package.json
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # use 4.2.4 https://github.com/peter-evans/create-pull-request/releases/tag/v4.2.4
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore(release): ${{github.event.release.tag_name}}'
Expand Down