|
| 1 | +name: Other Bump |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + |
| 8 | +jobs: |
| 9 | + releaseJob: |
| 10 | + name: Create Release |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - name: Checkout main branch to calculate changelog |
| 14 | + uses: actions/checkout@v2 |
| 15 | + with: |
| 16 | + fetch-depth: 0 |
| 17 | + |
| 18 | + - name: Calculate version |
| 19 | + id: tag_version |
| 20 | + uses: miguelfito/github-bump-and-tag-action@v1 |
| 21 | + with: |
| 22 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 23 | + default_bump: patch |
| 24 | + create_annotated_tag: true |
| 25 | + tag_prefix: v |
| 26 | + dry_run: true |
| 27 | + |
| 28 | + # - name: Set npm package version |
| 29 | + |
| 30 | + # with: |
| 31 | + # version: ${{ steps.tag_version.outputs.new_version }} |
| 32 | + # |
| 33 | + # - name: Commit & push version bumping on package*.json |
| 34 | + # uses: stefanzweifel/git-auto-commit-action@v4 |
| 35 | + # with: |
| 36 | + # branch: master |
| 37 | + # file_pattern: package*.json |
| 38 | + # commit_message: 'chore(release): Automated version bumping to ${{ steps.tag_version.outputs.new_tag }}' |
| 39 | + # commit_user_name: GitHub Actions |
| 40 | + # commit_user_email: [email protected] |
| 41 | + |
| 42 | + - name: Get updated commit SHA |
| 43 | + run: | |
| 44 | + echo "##[set-output name=commit_id;]$(git rev-parse HEAD)" |
| 45 | + id: updated_sha |
| 46 | + |
| 47 | + - name: Bump version and push tag |
| 48 | + uses: miguelfito/github-bump-and-tag-action@v1 |
| 49 | + with: |
| 50 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 51 | + commit_sha: ${{ steps.updated_sha.outputs.commit_id }} |
| 52 | + default_bump: patch |
| 53 | + create_annotated_tag: true |
| 54 | + tag_prefix: v |
| 55 | + |
| 56 | + - uses: fregante/release-with-changelog@v3 |
| 57 | + with: |
| 58 | + tag: ${{ steps.tag_version.outputs.new_tag }} |
| 59 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + commit-template: '- {date}: {title} ← {hash}' |
| 61 | + template: | |
| 62 | + ### Changelog |
| 63 | + {commits} |
| 64 | +
|
| 65 | + Compare: {range} |
| 66 | +
|
| 67 | + ❤ |
0 commit comments