Skip to content

Commit

Permalink
Merge pull request #77 from ParadigmMC/76-unexpected-http-response-40…
Browse files Browse the repository at this point in the history
…4-when-trying-to-download-packwiz

chore(packwiz): use nix
  • Loading branch information
jh-devv authored Mar 27, 2024
2 parents f2244da + 0c20116 commit 6d37a56
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 57 deletions.
17 changes: 2 additions & 15 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,15 @@ runs:

steps:

# --- Checkout the repo
- name: Check Out Git Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: 'main'

- name: Install nix and packwiz with it
uses: aldoborrero/use-nix-action@v4

# --- Install Packwiz
- name: Install packwiz
uses: supplypike/setup-bin@v3
with:
uri: "https://nightly.link/packwiz/packwiz/workflows/go/main/Linux%2064-bit%20x86.zip"
name: "packwiz"
version: "linux"


# --- Build Modrinth Pack If Wanted
- name: Build Modrinth Modpack
if: inputs.build-modrinth == 'true'
run: |
Expand All @@ -46,8 +37,6 @@ runs:
shell: bash
working-directory: ${{ inputs.modpack }}


# --- Build Curseforge Pack If Wanted
- name: Build CurseForge Modpack
if: inputs.build-curse == 'true'
run: |
Expand All @@ -57,8 +46,6 @@ runs:
working-directory: ${{ inputs.modpack }}


# --- Upload the pack/s to releases

- name: Upload Modrinth Modpack to GitHub Releases
if: inputs.build-modrinth == 'true'
run: |
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/bump-pack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,17 @@ runs:

steps:

# --- Checkout with the named branch
- name: Check Out Git Repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}


# --- Use sed to set the version
- name: Set the Version
run: sed -i 's/version = "[^"]*"/version = "${{ inputs.release-tag }}"/' ${{ inputs.modpack }}/${{ inputs.pack-file }}
shell: bash


# --- Push the version
- name: Push The Updated Version
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/parse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ runs:

steps:

# --- Checkout repo
- name: Check Out Git Repository
uses: actions/checkout@v3


# --- Parse the pack.toml
# I am bored so sorry that I don't explain this, you should probably read the code?
- name: Parse the pack.toml
id: parse
run: |
Expand Down
8 changes: 0 additions & 8 deletions .github/actions/release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ runs:
using: "composite"
steps:

# --- Checkout the repo
- name: Check Out Git Repository
uses: actions/checkout@v3

# --- Download the pack files
- name: Download the pack files
uses: robinraju/[email protected]
id: download-files
Expand All @@ -55,8 +53,6 @@ runs:
tarBall: false
zipBall: false


# --- Get latest release description
- name: Get latest release description
uses: cardinalby/git-get-release-action@v1
id: latest-release
Expand All @@ -65,8 +61,6 @@ runs:
with:
tag: ${{ inputs.release-tag }}


# --- Set publish version-type
- name: Set publish version-type
id: release-type
run: |
Expand All @@ -80,13 +74,11 @@ runs:
shell: bash


# --- Pipe latest release description to file
- name: Pipe latest release description to file
run: echo "${{ steps.latest-release.outputs.body }}" > CHANGELOG.release.md
shell: bash


# --- Print status
- name: Print status
run: |
echo "::notice ::⚙ Assets from latest release ${{ steps.latest-release.outputs.tag_name }} downloaded successfully!"
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ jobs:
contents: write

steps:
# --- Checkout the repo
- name: Check Out Git Repository
uses: actions/checkout@v4

# --- Get current branch
- name: Get current branch
id: branch
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT

# --- Set the new version
# TODO: Change to an pr
- name: Set the New Version
uses: stefanzweifel/git-auto-commit-action@v5
with:
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@ jobs:

steps:

# -- Checkout repo
- name: Check Out Git Repository
uses: actions/checkout@v4


# --- Parse the modpacks to and list
# This just parses the folders that have pack.toml
- name: List Modpacks
id: list-modpacks
run: |
Expand All @@ -49,7 +45,6 @@ jobs:
echo "modpack-folders=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${modpackFolders[@]}")" >> "$GITHUB_OUTPUT"
# --- Print an nice msg about parsing
- name: Current detected modpacks
run: |
echo "::notice ::⚙ Current detected modpacks: ${{ steps.list-modpacks.outputs.modpack-folders }}"
Expand Down Expand Up @@ -81,8 +76,6 @@ jobs:

steps:

# --- Release please
# Creates and manages the prs and releases
- name: Perform Release with Release Please
id: release-please
uses: google-github-actions/release-please-action@v4
Expand All @@ -100,9 +93,6 @@ jobs:
{"type":"chore","section":"⛭ Miscellaneous","hidden":true}]
# --- Parse version from PR Title when creating PR's
# Had to do this cause like to bump on the release pleae branch
# The tests for the shitty Regex can be found here: https://regexr.com/7lb8e
- name: Parse tag from PR title
uses: actions-ecosystem/action-regex-match@v2
id: version
Expand All @@ -112,16 +102,12 @@ jobs:
if: ${{ steps.release-please.outputs.pr != '' }}


# --- Checkout the git repo
# Remembed to do this AFTER release please
- name: Check Out Git Repository
uses: actions/checkout@v4
with:
fetch-depth: 0


# --- Bump version
# Now we should use the parsed release to bump the version on the files on the release please branch
- name: Bump Version
uses: ./.github/actions/bump-pack
with:
Expand All @@ -131,14 +117,11 @@ jobs:
if: ${{ steps.release-please.outputs.pr != '' }}


# --- Get latest tag
# Should probably be switched to use the release please tag but whatever
- name: Get Latest tag
id: tag
uses: WyriHaximus/github-action-get-previous-tag@v1
if: ${{ steps.release-please.outputs.releases_created }}

# --- Handle the configs
- name: Parse Pack File
id: parse
uses: ./.github/actions/parse
Expand All @@ -155,7 +138,6 @@ jobs:
if: ${{ steps.release-please.outputs.releases_created }}


# --- Build an release
- name: Build Modpack
uses: ./.github/actions/build
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Packwiz
uses: supplypike/setup-bin@v3
with:
uri: 'https://nightly.link/packwiz/packwiz/workflows/go/main/Linux%2064-bit%20x86.zip'
name: 'packwiz'
version: 'linux'
- name: Install nix and packwiz with it
uses: aldoborrero/use-nix-action@v4

- name: Update Mods with Packwiz
run: packwiz update -a -y
Expand Down

0 comments on commit 6d37a56

Please sign in to comment.