From f50289bfd0fbb066b46dbfb9563452696a3b2f02 Mon Sep 17 00:00:00 2001 From: 7c00 Date: Tue, 14 Feb 2023 10:14:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=91=E5=B8=83=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=EF=BC=8Cnpm=20publish=20=E4=B8=8E=20build=20example?= =?UTF-8?q?=20=E5=B9=B6=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bb84428..c3a17aa1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,21 @@ on: release: types: [published] jobs: - release: + publish: + runs-on: ubuntu-latest + steps: + - uses: bruceadams/get-release@v1.3.2 + id: release + env: + GITHUB_TOKEN: ${{ github.token }} + - uses: actions/setup-node@v3 + with: + registry-url: "https://registry.npmjs.org" + - run: npm version ${{ steps.release.outputs.tag_name }} --no-git-tag-version + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + build-example: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -19,18 +33,7 @@ jobs: working-directory: example/android/app - run: ./gradlew assembleRelease working-directory: example/android - - uses: bruceadams/get-release@v1.3.2 - id: release - env: - GITHUB_TOKEN: ${{ github.token }} - uses: svenstaro/upload-release-action@v2 with: - file: example/android/app/build/outputs/apk/release/app-arm64-v8a-release.apk - asset_name: example.apk - - uses: actions/setup-node@v3 - with: - registry-url: "https://registry.npmjs.org" - - run: npm version ${{ steps.release.outputs.tag_name }} --no-git-tag-version - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + file: example/android/app/build/outputs/apk/release/app-*-release.apk + file_glob: true