2023-07-10 19:11:30 +00:00
|
|
|
name: Create zip and upload release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-07-10 19:12:23 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
apt-get update
|
2023-07-10 19:36:22 +00:00
|
|
|
apt-get install -y zip jq
|
2023-07-10 19:11:30 +00:00
|
|
|
- name: Check out repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Create output directory
|
|
|
|
run: mkdir release
|
|
|
|
- name: Create resource pack archive
|
|
|
|
run: |
|
|
|
|
cd pack
|
|
|
|
zip -r ../release/ponk.zip .
|
|
|
|
- name: Generate sha1sum
|
|
|
|
run: |
|
|
|
|
sha1sum release/ponk.zip | cut -d " " -f 1 | tr -d '\n' > release/ponk.zip.sha1
|
|
|
|
- name: Create and upload release
|
|
|
|
uses: actions/forgejo-release@v1
|
|
|
|
with:
|
|
|
|
direction: upload
|
|
|
|
release-dir: release
|
|
|
|
token: ${{ github.token }}
|
2023-07-10 19:21:37 +00:00
|
|
|
tag: $(git rev-parse --short ${{ github.sha }})
|
2023-07-10 19:36:22 +00:00
|
|
|
release-notes: |
|
|
|
|
Release triggered by commit ${{ github.sha }} from @${{ github.actor }}
|
|
|
|
> $(echo '${{ github.event.head_commit.message }}' | tr '\n' '\n> ' | jq -sRr @uri)
|