|
1 |
| -name: Auto Release |
| 1 | +name: Release # Workflow name displayed on GitHub |
2 | 2 |
|
3 | 3 | on:
|
| 4 | + workflow_dispatch: # Trigger manually |
4 | 5 | push:
|
5 | 6 | branches:
|
6 |
| - - main # Change 'main' to your default branch name |
| 7 | + - main # Branch on which the workflow will run |
7 | 8 |
|
8 | 9 | jobs:
|
9 |
| - build: |
10 |
| - runs-on: ubuntu-latest # You can use other runners like macOS or Windows |
| 10 | + new-release: |
| 11 | + runs-on: ubuntu-latest |
11 | 12 |
|
12 | 13 | steps:
|
13 |
| - - name: Checkout code |
14 |
| - uses: actions/checkout@v2 |
| 14 | + - name: Checkout our working repository |
| 15 | + uses: actions/checkout@v3 |
15 | 16 |
|
16 |
| - # Add steps here to build and test your code, if required. |
17 |
| - |
18 |
| - - name: Set up Python |
19 |
| - uses: actions/setup-python@v2 |
| 17 | + - name: Conventional Changelog Action |
| 18 | + id: changelog |
| 19 | + uses: TriPSs/conventional-changelog-action@v3 |
20 | 20 | with:
|
21 |
| - python-version: 3.x # Specify the Python version you need |
22 |
| - |
23 |
| - # Add steps here to build the Python package, generate a wheel, etc. |
| 21 | + github-token: ${{ secrets.github_token }} |
| 22 | + output-file: "false" |
24 | 23 |
|
25 |
| - - name: Create Release |
26 |
| - id: create_release |
| 24 | + - name: Create Release # This action will create the actual release |
27 | 25 | uses: actions/create-release@v1
|
| 26 | + if: ${{ steps.changelog.outputs.skipped == 'false' }} |
28 | 27 | env:
|
29 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + GITHUB_TOKEN: ${{ secrets.github_token }} |
30 | 29 | with:
|
31 |
| - tag_name: v1.0.0 # Specify the version number you want to release |
32 |
| - release_name: Release ${{ github.ref }} |
33 |
| - body: | |
34 |
| - Add release notes here |
35 |
| - You can also include links to the artifacts like mvn jar and pypi package. |
36 |
| - draft: false |
37 |
| - prerelease: false |
38 |
| - |
39 |
| - # Add steps here to upload any additional artifacts (e.g., mvn jar, pypi package, etc.) if required. |
40 |
| - |
| 30 | + tag_name: ${{ steps.changelog.outputs.tag }} |
| 31 | + release_name: ${{ steps.changelog.outputs.tag }} |
| 32 | + body: ${{ steps.changelog.outputs.clean_changelog }} |
0 commit comments