diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f85552a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +# This is a basic workflow to help you get started with Actions + +name: Release + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + tags: + - "v*" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Uses NodeJs Environment + - uses: actions/setup-node@v1 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + + - name: install dependencies + run: yarn + + - name: build win x64 + run: yarn electron:build:win + + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + + - name: Archive Release + run: powershell Compress-Archive -Path ./dist_electron/ -DestinationPath win_x64_IKFB_${{steps.tag.outputs.tag}}.zip + + - name: Upload Release + uses: ncipollo/release-action@v1 + with: + artifacts: "win_x64_IKFB_${{steps.tag.outputs.tag}}.zip" + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index f3479e8..b0dfa87 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "lint": "vue-cli-service lint", "electron:build": "vue-cli-service electron:build", "electron:serve": "vue-cli-service electron:serve", + "electron:build:win": "vue-cli-service electron:build --publish never", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps" },