From 76a7b0141e2e9cf7f6b7dc2fd8a375b13a3f93c4 Mon Sep 17 00:00:00 2001 From: csg01123119 Date: Wed, 23 Aug 2023 17:54:45 +0800 Subject: [PATCH] feat: init --- .github/workflows/action-demo.yml | 25 +++++++++++++++++++++++++ .github/workflows/release.yml | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/action-demo.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/action-demo.yml b/.github/workflows/action-demo.yml new file mode 100644 index 0000000..d3904a1 --- /dev/null +++ b/.github/workflows/action-demo.yml @@ -0,0 +1,25 @@ +name: act-demo +run-name: act-demo-runing +on: + pull_request: + branches: [main] + +jobs: + job1: + environment: GANG-EVN + runs-on: macos-latest + strategy: + matrix: + node-version: [10.x] + env: + OSS_ID: ${{ secrets.OSS_ID }} + HUAN_VAR: ${{ vars.HUAN_VAR }} + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: echo "${{ secrets.OSS_ID }} = ${{ vars.HUAN_VAR }}" + - run: npm install + - run: npm run start diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4c0ca3b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release +on: + push: + branches: [release] + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 18 + - run: npm i + - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}