name: bump-version on: workflow_dispatch: inputs: version: description: 'Version (options: major, minor, patch, x.x.x)' required: true default: patch jobs: bump: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 registry-url: https://registry.npmjs.org/ - run: npm ci - run: | git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" - id: version run: | VERSION=$(npm version ${{ github.event.inputs.version }}) echo "::set-output name=VERSION::$VERSION" - run: npm run docs && touch docs/.nojekyll - run: "git add docs config.schema.json && git commit -m 'Update docs: ${{ steps.version.outputs.VERSION }}'" - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: git push --tags origin master - name: Create Release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ steps.version.outputs.VERSION }} release_name: ${{ steps.version.outputs.VERSION }} body: ${{ steps.version.outputs.VERSION }} draft: false prerelease: false