Skip to content

Commit

Permalink
chore: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Nov 13, 2023
1 parent ae220ac commit 622a38a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "env NPM_TOKEN not set!"
else
echo ::set-output name=is-ok::"1"
echo "publish=nightly" >> $GITHUB_OUTPUT
fi
- name: Prepare Environment
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn
env:
Expand All @@ -39,7 +39,7 @@ jobs:
with:
remove-version-tag-prefix: false
- name: Bump version to nightly
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
COMMIT_TIMESTAMP=$(git log -1 --pretty=format:%ct HEAD)
COMMIT_DATE=$(date -d @$COMMIT_TIMESTAMP +%Y%m%d-%H%M%S)
Expand All @@ -49,18 +49,18 @@ jobs:
env:
CI: true
- name: Build
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn build
env:
CI: true
- name: Set .npmrc file
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm whoami
- name: Git commit
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
git config --global user.email "ci@github.com"
git config --global user.name "Github CI"
Expand All @@ -69,7 +69,7 @@ jobs:
env:
CI: true
- name: Publish nightly to NPM
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: yarn lerna:publish from-package --dist-tag nightly --no-verify-access --yes
env:
CI: true
10 changes: 5 additions & 5 deletions .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,27 @@ jobs:
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "env NPM_TOKEN not set!"
else
echo ::set-output name=is-ok::"1"
echo "publish=prerelease" >> $GITHUB_OUTPUT
fi
- name: Prepare Environment
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn
env:
CI: true
- name: Build
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn build
env:
CI: true
- name: Set .npmrc file
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm whoami
- name: Publish prerelease to NPM
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: yarn lerna:publish from-package --dist-tag prerelease --no-verify-access --yes
env:
CI: true
10 changes: 5 additions & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,27 +108,27 @@ jobs:
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "env NPM_TOKEN not set!"
else
echo ::set-output name=is-ok::"1"
echo "publish=release" >> $GITHUB_OUTPUT
fi
- name: Prepare Environment
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn
env:
CI: true
- name: Build
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn build
env:
CI: true
- name: Set .npmrc file
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm whoami
- name: Publish to NPM
if: ${{ steps.check-npm-token.outputs.is-ok }}
if: ${{ steps.do-publish.outputs.publish }}
run: yarn lerna:publish from-package --no-verify-access --yes
env:
CI: true

0 comments on commit 622a38a

Please sign in to comment.