Skip to content

Commit

Permalink
Automatically build zip and create Github release
Browse files Browse the repository at this point in the history
  • Loading branch information
4Ply authored Jun 22, 2024
1 parent dc95805 commit ae89605
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: zip-and-release
on: [ push ]
permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: Extract datapack version
run: |
version=$(awk '/DATAPACK VERSION NUMBER/ { print $5 }' "Brilliance Datapack/data/do2/functions/version.mcfunction")
echo "BRILLIANCE_VERSION=${version}" >> "$GITHUB_ENV"
- name: Create zip
run: cd "Brilliance Datapack" && zip -r brilliance-datapack.zip .

- name: Create Github release
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/main'
with:
make_latest: true
tag_name: ${{ env.BRILLIANCE_VERSION }}
files: |
Brilliance Datapack/brilliance-datapack.zip

0 comments on commit ae89605

Please sign in to comment.