Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
Working on automatically formatting for the server
  • Loading branch information
mgwatkins2 authored Dec 13, 2024
1 parent 168a57e commit 8b07f02
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Resourcepack Zipper

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

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

- name: Create ZIP file
run: |
COMMIT_ID=$(git rev-parse --short HEAD)
ZIP_NAME="RP.zip"
echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV
zip -r "${ZIP_NAME}" .
- name: Upload ZIP artifact
uses: actions/upload-artifact@v2
with:
name: resource-pack-artifact
path: ${{ env.ZIP_NAME }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RESOURCE_ZIPPER }}
with:
tag_name: release-${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false

- name: Upload Release Artifact
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RESOURCE_ZIPPER }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ env.ZIP_NAME }}
asset_name: ${{ env.ZIP_NAME }}
asset_content_type: application/zip

0 comments on commit 8b07f02

Please sign in to comment.