From b9957338f0e46f6fd12a3d1a9987066db3ec557e Mon Sep 17 00:00:00 2001 From: Max Rozborskyi Date: Tue, 28 Feb 2023 11:21:14 +0200 Subject: [PATCH] Github action for release --- .github/workflows/prepare_release.yaml | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/prepare_release.yaml diff --git a/.github/workflows/prepare_release.yaml b/.github/workflows/prepare_release.yaml new file mode 100644 index 0000000..15026ea --- /dev/null +++ b/.github/workflows/prepare_release.yaml @@ -0,0 +1,60 @@ +name: Prepare Release + +on: + workflow_dispatch: + push: + tags: + - "v*" + +env: + CI: true + +permissions: + contents: read + +jobs: + build: + permissions: + contents: write # for softprops/action-gh-release to create GitHub release + + runs-on: macos-11 + + strategy: + matrix: + node-version: [18] + + steps: + - uses: actions/checkout@v3 + + - run: git fetch --tags -f + + - name: Resolve version + id: vars + run: | + echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + run: npm install + + - name: Build shikicli + run: npm run build + + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: true + tag_name: ${{ env.TAG_NAME }} + files: | + dist/shikicli-linux-arm64 + dist/shikicli-linux-armv7 + dist/shikicli-linux-x64 + dist/shikicli-macos-arm64 + dist/shikicli-macos-x64 + dist/shikicli-win-x64.exe + dist/shikicli-win-arm64.exe