forked from Napp/xray-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3412b55
commit b715b3c
Showing
2 changed files
with
19 additions
and
85 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,55 +8,29 @@ on: | |
- "*" | ||
|
||
jobs: | ||
generate-changelog: | ||
name: Generate changelog | ||
release: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get latest published release tag | ||
id: get_latest_release | ||
uses: pozetroninc/[email protected] | ||
with: | ||
repository: ${{ github.repository }} | ||
excludes: prerelease, draft | ||
- name: Generate changelog since last published release | ||
uses: charmixer/auto-changelog-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
future_release: ${{ github.ref }} | ||
since_tag: ${{ steps.get_latest_release.outputs.release }} | ||
- name: Upload changelog | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: changelog | ||
path: CHANGELOG.md | ||
|
||
draft-release: | ||
name: Draft Github release | ||
needs: generate-changelog | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- name: Extract tag name | ||
id: tag | ||
uses: actions/github-script@v4 | ||
with: | ||
result-encoding: string | ||
script: | | ||
return context.payload.ref.replace(/\/refs\/tags\//, ''); | ||
- name: Build Changelog | ||
id: github_release | ||
uses: mikepenz/release-changelog-builder-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Download changelog | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: changelog | ||
- name: Draft release with changelog | ||
id: create_release | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: ${{steps.github_release.outputs.changelog}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create PR | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
tag_name: ${{ steps.tag.outputs.result }} | ||
release_name: POS System ${{ steps.tag.outputs.result }} | ||
body_path: CHANGELOG.md | ||
draft: true | ||
prerelease: false | ||
delete-branch: true | ||
title: Updating CHNAGELOG.md | ||
body: ${{steps.github_release.outputs.changelog}} | ||
labels: doc,changelog |