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

migrate to github action CI & CD #239

Merged
merged 12 commits into from
Nov 6, 2021
Merged
Prev Previous commit
Next Next commit
release plugin
  • Loading branch information
foxundermoon committed Nov 6, 2021
commit cec046fab27a459db2627a5f1c7f77d803dff93e
24 changes: 24 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ jobs:
runs-on: ubuntu-latest
needs: unit-test
steps:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: read version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
Expand All @@ -73,6 +88,8 @@ jobs:
echo "need publish"
echo "NEED_RELEASE=yes" >> $GITHUB_ENV
fi
- run: yarn
if: env.NEED_RELEASE == 'yes'
- name: mini changelog
if: env.NEED_RELEASE == 'yes'
id: minichangelog
Expand Down Expand Up @@ -119,3 +136,10 @@ jobs:
asset_path: ./${{ env.FILE_NAME }}
asset_name: ${{ env.FILE_NAME }}
asset_content_type: application/gzip
- name: Vscode release plugin
uses: JCofman/vscodeaction@master
if: env.NEED_RELEASE == 'yes'
env:
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
with:
args: publish -p $PUBLISHER_TOKEN