forked from SatelliteQE/robottelo
-
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.
Auto Release Robottelo (SatelliteQE#11365)
- Loading branch information
1 parent
2a624fd
commit bcc3f94
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### The auto release workflow triggered through dispatch request from CI | ||
name: auto-release | ||
|
||
# Run on workflow dispatch from CI | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
type: string | ||
description: Name of the tag | ||
|
||
jobs: | ||
auto-tag-and-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Git User setup | ||
run: "git config --local user.email Satellite-QE.satqe.com && git config --local user.name Satellite-QE" | ||
|
||
- name: Tag latest commit | ||
run: "git tag -a ${{ github.event.inputs.tag_name }} -m 'Tagged By SatelliteQE Automation User'" | ||
|
||
- name: Push the tag to the upstream | ||
run: "git push ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git --tags" | ||
|
||
- name: create a new release from the tag | ||
env: | ||
credentials: ${{ secrets.GH_TOKEN }} | ||
run: "curl -L -X POST -H \"Authorization: Bearer ${{ secrets.SATQE_GH_TOKEN }}\" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases -d '{\"tag_name\": \"${{ github.event.inputs.tag_name }}\", \"target_commitish\":\"master\", \"name\":\"${{ github.event.inputs.tag_name }}\", \"draft\":false, \"prerelease\":true, \"generate_release_notes\": true}'" |