Skip to content

Commit

Permalink
chore: update gha workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 3, 2023
1 parent ff3a32c commit 41173da
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
23 changes: 11 additions & 12 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Prepare Environment
run: |
yarn install
Expand All @@ -45,7 +45,7 @@ jobs:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -65,9 +65,9 @@ jobs:
CI: true
- name: Send coverage
uses: codecov/codecov-action@v2
if: matrix.node-version == '16.x'
if: matrix.node-version == '18.x'
- name: Check docs generation
if: matrix.node-version == '16.x'
if: matrix.node-version == '18.x'
run: |
yarn docs
env:
Expand All @@ -85,13 +85,13 @@ jobs:
- test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 14.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- name: Check release is desired
id: do-publish
run: |
Expand All @@ -112,12 +112,11 @@ jobs:
if verlt $PUBLISHED_VERSION $THIS_VERSION
then
echo "Publishing latest"
echo ::set-output name=tag::"latest"
echo "tag=latest" >> $GITHUB_OUTPUT
else
echo "Publishing hotfix"
echo ::set-output name=tag::"hotfix"
echo "tag=hotfix" >> $GITHUB_OUTPUT
fi
fi
- name: Prepare build
if: ${{ steps.do-publish.outputs.tag }}
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -41,40 +41,35 @@ jobs:
- test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Check release is desired
id: do-publish
run: |
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "No Token"
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "Publish nightly"
echo ::set-output name=publish::"nightly"
echo "publish=nightly" >> $GITHUB_OUTPUT
else
echo "Publish experimental"
echo ::set-output name=publish::"experimental"
echo "publish=experimental" >> $GITHUB_OUTPUT
fi
- name: Prepare Environment
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn install
env:
CI: true
- name: Get the Prerelease tag
id: prerelease-tag
uses: yuya-takeyama/docker-tag-from-github-ref-action@2b0614b1338c8f19dd9d3ea433ca9bc0cc7057ba
with:
remove-version-tag-prefix: false
- name: Bump version and build
if: ${{ steps.do-publish.outputs.publish }}
run: |
PRERELEASE_TAG=nightly-${{ steps.prerelease-tag.outputs.tag }}
PRERELEASE_TAG=nightly-$(echo "${{ github.ref_name }}" | sed -r 's/[^a-z0-9]+/-/gi')
yarn release --prerelease $PRERELEASE_TAG
yarn build
env:
Expand Down

0 comments on commit 41173da

Please sign in to comment.