diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 31ee847..25a662d 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -2,6 +2,14 @@ name: PUBLISH on: workflow_dispatch: + inputs: + version_type: + description: 'Version type' + required: true + default: 'patch' + options: + - 'patch' + - 'minor' jobs: publish: @@ -15,13 +23,26 @@ jobs: node-version: 18.10.0 cache: 'npm' + - uses: actions/setup-git@v1 + with: + token: ${{ github.token }} + - name: Install run: make install - name: Setup Windows adapter run: make setup-windows + - name: Bump patch version + if: github.event.inputs.version_type == 'patch' + run: npm version patch + + - name: Bump minor version + if: github.event.inputs.version_type == 'minor' + run: npm version minor + + - name: Git push + run: git push --follow-tags + - name: Forge publish - env: - GITHUB_TOKEN: ${{ github.token }} - run: make publish + run: npx electron-forge publish diff --git a/Makefile b/Makefile index 9433215..3c8d2d3 100644 --- a/Makefile +++ b/Makefile @@ -61,11 +61,3 @@ lint: .PHONY: start start: npx electron-forge start - -.PHONY: package -package: - npx electron-forge package - -.PHONY: publish -publish: - npx electron-forge publish \ No newline at end of file diff --git a/forge.config.ts b/forge.config.ts index 5450d1f..66610a8 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -60,7 +60,7 @@ const config: ForgeConfig = { owner: 'pboutin', name: 'dofus-team', }, - authToken: process.env.GITHUB + authToken: process.env.GITHUB_TOKEN, }, }, ],