Skip to content

Commit

Permalink
Create zip.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
29cmb authored Nov 2, 2024
1 parent 371c3cb commit cf5c397
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ZIP Resource Pack

on:
push:
branches:
- '*'
workflow_dispatch:

jobs:
create-zip:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get timestamp
id: timestamp
run: echo "timestamp=$(date +'%Y%m%d_%H%M%S')" >> $GITHUB_OUTPUT

- name: Get short SHA
id: sha
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Create zip archive
run: |
zip -r "repo_${{ steps.timestamp.outputs.timestamp }}_${{ steps.sha.outputs.sha }}.zip"
- name: Upload zip artifact
uses: actions/upload-artifact@v4
with:
name: repository-archive
path: "repo_${{ steps.timestamp.outputs.timestamp }}_${{ steps.sha.outputs.sha }}.zip"

0 comments on commit cf5c397

Please sign in to comment.