-
Notifications
You must be signed in to change notification settings - Fork 1
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
4b9ba73
commit cd0a525
Showing
4 changed files
with
811 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,66 @@ | ||
name: Release | ||
|
||
# Add a concurrency group incase a tag is created, deleted, and then recreated while a release is in progress. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
# Only run this workflow when a tag is pushed when the tag starts with "v". | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
# So we can use the GitHub API to create releases with the run token. | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
Release: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: MeddleTools/ | ||
shell: bash | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update blender_manifest.toml | ||
working-directory: MeddleTools/ | ||
run: | | ||
sed -i "s/version = \".*\"/version = \"${{ github.ref_name }}\"/g" blender_manifest.toml | ||
- name: Zip Blender Plugin | ||
working-directory: MeddleTools/ | ||
run: | | ||
zip -r "MeddleTools-${{ github.ref_name }}.zip" . | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
MeddleTools/MeddleTools-${{ github.ref_name }}.zip | ||
prerelease: false | ||
append_body: true # Append the release notes to the release body | ||
generate_release_notes: true # Automatically makes a release body from PRs since the last release. | ||
fail_on_unmatched_files: true # If the files arent found, fail the workflow and abort the release. | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Release Artifacts | ||
path: | | ||
MeddleTools/MeddleTools-${{ github.ref_name }}.zip | ||
- name: Push Changes to Main | ||
working-directory: MeddleTools/ | ||
run: | | ||
git add blender_manifest.toml | ||
git config --local user.name "github-actions [bot]" | ||
git config --local user.email "[email protected]" | ||
git commit -m "Update blender_manifest.toml for ${{ github.ref_name }}" | ||
git push origin HEAD:main |
Oops, something went wrong.