newversion #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: New version | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [newversion] | |
jobs: | |
newversion: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- uses: actions/setup-node@v3 #Setup Node | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Create local changes | |
run: | | |
npm ci | |
npm i jodit@beta | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
npm version prerelease --preid=beta --no-git-tag-version | |
npm run git | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
tags: true | |
- name: Trigger release action | |
run: | | |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/jodit/jodit-react/dispatches --data '{"event_type": "release" }' | |