Commit from GitHub Actions (Auto Update) #221
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PACK_NAME: nrm-src | |
| OUTPUT: artifacts | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| cache: false | |
| - name: Install Packwiz | |
| run: go install github.com/packwiz/packwiz@latest | |
| - name: Create short commit SHA | |
| id: vars | |
| run: | | |
| shortSha=$(git rev-parse --short ${{ github.sha }}) | |
| echo "COMMIT_SHORT_SHA=$shortSha" >> $GITHUB_ENV | |
| - name: Build | |
| run: | | |
| mkdir nrm-src-temp | |
| cp -r ./versions/modrinth/neoforged/src/* ./nrm-src-temp/ | |
| cp ./LICENSE ./nrm-src-temp/ | |
| cp ./README.md ./nrm-src-temp/ | |
| cd ./nrm-src-temp/ | |
| packwiz refresh | |
| mkdir -p ../$OUTPUT | |
| packwiz modrinth export --output ../${OUTPUT}/${PACK_NAME}-dev-${{ env.COMMIT_SHORT_SHA }}.mrpack | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "nrm-src-dev-${{ env.COMMIT_SHORT_SHA }}" | |
| path: artifacts |