Skip to content

Commit

Permalink
Automated release with .zip file creation (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bafy78 authored Aug 16, 2024
1 parent aff17c1 commit c8c1e08
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/create-resource-pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create Resource Pack

on:
push:
branches:
- main

jobs:
create-resource-pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Read major version
id: major_version
run: echo "::set-output name=version::$(cat version.txt)"

- name: Create Resource Pack Zip
run: |
zip -r TGC_Pack_V${{ steps.major_version.outputs.version }}-${{ github.run_number }}.zip TGC_Pack/
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.major_version.outputs.version }}-${{ github.run_number }}
release_name: Release ${{ steps.major_version.outputs.version }}-${{ github.run_number }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./TGC_Pack_V${{ steps.major_version.outputs.version }}-${{ github.run_number }}.zip
asset_name: TGC_Pack_V${{ steps.major_version.outputs.version }}-${{ github.run_number }}.zip
asset_content_type: application/zip
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8

0 comments on commit c8c1e08

Please sign in to comment.