Skip to content

Commit

Permalink
Merge pull request #2 from OrzMiku/github_workflow
Browse files Browse the repository at this point in the history
feat: Add GitHub Actions workflow for exporting modpack
  • Loading branch information
OrzMiku authored Nov 18, 2024
2 parents 5734b35 + fe8faea commit 5753010
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/export.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Export Modpack
on:
push:
branches: [ "main" ]
workflow_dispatch:
inputs:
reason:
description: 'Reason for manual export'
required: false
default: 'Manual modpack export'
jobs:
export-modpack:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.19'

- name: Install Packwiz
run: go install github.com/packwiz/packwiz@latest

- name: Add Go bin to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: Export Modrinth Modpack
run: |
cd versions/fabric/1.21.1
packwiz modrinth export
echo "MODPACK_NAME=$(ls *.mrpack | sed 's/.mrpack$//')" >> $GITHUB_ENV
- name: Upload Modrinth Modpack
uses: actions/upload-artifact@v3
with:
name: ${{ env.MODPACK_NAME }}
path: versions/fabric/1.21.1/${{ env.MODPACK_NAME }}.mrpack
retention-days: 7

0 comments on commit 5753010

Please sign in to comment.