diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3b0e6a8ae..8e068f5f8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,6 @@ name: Publish package to GitHub Packages on: - release: - types: [created] + push: workflow_dispatch: jobs: build: @@ -11,6 +10,8 @@ jobs: packages: write steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Setup .npmrc file to publish to GitHub Packages - uses: actions/setup-node@v3 with: @@ -18,7 +19,11 @@ jobs: registry-url: 'https://npm.pkg.github.com' # Defaults to the user or organization that owns the workflow file scope: '@kedyou' - - run: npm ci - - run: npm publish + - name: Build and publish + run: | + npm version --no-git-tag-version "$(npm view @kedyou/mathlive version)" + npm version --no-git-tag-version --preid=kedyou prerelease + npm ci + npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 1ede69e5c..b961c2831 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "name": "@kedyou/mathlive", - "version": "0.95.0-kedyou.1", "description": "A web component for math input", "license": "MIT", "funding": { @@ -55,9 +54,7 @@ "lint": "eslint --fix src/; prettier -w src/", "prepare": "bash ./scripts/build.sh production", "start": "bash ./scripts/start.sh", - "test": "bash ./scripts/test.sh", - "version": "bash ./scripts/version.sh", - "postversion": "bash ./scripts/github-release.sh" + "test": "bash ./scripts/test.sh" }, "author": "Arno Gourdol ", "contributors": [