Skip to content

Commit

Permalink
Npm versionning in CI and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pboutin committed Sep 7, 2024
1 parent b628e54 commit 649bce0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: PUBLISH

on:
workflow_dispatch:
inputs:
version_type:
description: 'Version type'
required: true
default: 'patch'
options:
- 'patch'
- 'minor'

jobs:
publish:
Expand All @@ -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
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const config: ForgeConfig = {
owner: 'pboutin',
name: 'dofus-team',
},
authToken: process.env.GITHUB
authToken: process.env.GITHUB_TOKEN,
},
},
],
Expand Down

0 comments on commit 649bce0

Please sign in to comment.