-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create GitHub action to automate mcad release
- Loading branch information
1 parent
e87b97c
commit 2b7da3a
Showing
5 changed files
with
13 additions
and
11 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 |
---|---|---|
|
@@ -14,18 +14,16 @@ jobs: | |
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
- name: check tag format | ||
run: | | ||
if [[ "${{ github.event.inputs.tag }}" =~ "^v\d+\.\d+\.\d+$" ]]; then | ||
if [[ "${{ github.event.inputs.tag }}" =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then | ||
echo "Tag format is valid." | ||
else | ||
echo "Invalid tag format: ${{ github.event.inputs.tag }}" | ||
|
@@ -38,5 +36,8 @@ jobs: | |
echo "Tag ${{ github.event.inputs.tag }} already exist. Exiting workflow." | ||
exit 1 | ||
else | ||
gh release create ${{ github.event.inputs.tag }} --title "MCAD ${{ github.event.inputs.tag }} Release" --generate-notes | ||
fi | ||
gh release create ${{ github.event.inputs.tag }} --title "MCAD ${{ github.event.inputs.tag }} Release" --generate-notes --target ${{ github.ref }} | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.