Skip to content

Commit 5f7a2e7

Browse files
authored
Update and rename publish-release.yml to create-release-and-publish.yml
1 parent dd88b57 commit 5f7a2e7

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.github/workflows/publish-release.yml renamed to .github/workflows/create-release-and-publish.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,31 @@
44
name: Publish a new release
55

66
on:
7-
release:
8-
types:
9-
- published
10-
7+
push:
8+
branches:
9+
- main
1110
jobs:
1211
build:
1312
runs-on: ubuntu-latest
1413
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
- name: Changelog
19+
uses: scottbrenner/generate-changelog-action@master
20+
- name: Create Release
21+
id: create_release
22+
uses: actions/create-release@latest
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
25+
with:
26+
tag_name: v0.0.${{ github.run_number }}
27+
release_name: Release v0.0.${{ github.run_number }}
28+
body: |
29+
${{ steps.Changelog.outputs.changelog }}
30+
draft: false
31+
prerelease: false
1532
- uses: actions/checkout@v2
1633
- name: Set up Python 3.9
1734
uses: actions/setup-python@v2

0 commit comments

Comments
 (0)