Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
PassiveModding committed Sep 22, 2024
1 parent 4b9ba73 commit cd0a525
Show file tree
Hide file tree
Showing 4 changed files with 811 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
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
Loading

0 comments on commit cd0a525

Please sign in to comment.