Skip to content

Commit

Permalink
Merge pull request #254 from Incpi/dev
Browse files Browse the repository at this point in the history
Workflow-Update Removed inital remove zip function. Script Cleanup. 😃
  • Loading branch information
dbeck121 authored Dec 19, 2024
2 parents 5d61d85 + 6c2d44b commit ef52c8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name: Create Zip file from Dev
on:
push:
branches:
- dbeck121-patch-1 # Change this to your default branch
- dev # Change this to your default branch

jobs:
generate_and_commit:
Expand All @@ -39,7 +39,7 @@ jobs:
if git diff --quiet; then
echo "No changes to commit."
else
git add bin/
git add -A bin/
git commit -m "Add new release files generated by zipFiles.sh"
git push
fi
Expand All @@ -48,4 +48,4 @@ jobs:

- name: Prevent re-triggering the Workflow
if: contains(github.event.head_commit.message, 'Add new files generated by zipFiles.sh')
run: echo "Skipping because this is the automated commit message from our script."
run: echo "Skipping because this is the automated commit message from our script."
38 changes: 5 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,16 @@
name: Create Release from Manifest

on:
push:
workflow_run:
workflows: [ "Create Zip file from Dev" ]
types:
- completed
branches:
- main # Change this to your default branch
- dev

jobs:
generate_and_commit:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

# Generate files with the shell script
- name: Run Shell Script and Commit Generated Files
run: |
# Make the shell script executable and run it
chmod +x ./zipFiles.sh
./zipFiles.sh
# Configure Git
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "GitHub Action"
# Add all newly generated files to Git
git add bin/*
git add docs/*
git commit -m "Add new files generated by zipFiles.sh on $(date)"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Prevent re-triggering the Workflow
if: contains(github.event.head_commit.message, 'Add new files generated by zipFiles.sh')
run: echo "Skipping because this is the automated commit message from our script."

release:
runs-on: ubuntu-latest
needs: generate_and_commit

permissions:
contents: write
Expand Down

0 comments on commit ef52c8a

Please sign in to comment.