-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cefdba0
Showing
69 changed files
with
1,143 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist/ | ||
dev/ | ||
*.zip | ||
*.log |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build and release | ||
|
||
# This workflow runs when any of the following occur: | ||
# - A tag starting with "v" is created | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
# Used to run locally using https://github.com/nektos/act | ||
env: | ||
ACT: | ||
|
||
jobs: | ||
# This pushes the zip to GitHub Packages. | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
# | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up (act) | ||
if: ${{ env.ACT }} | ||
run: | | ||
apt-get update | ||
apt-get install zip make -y | ||
# Builds dist/fh2_matt_bakers_texture_pack_<version>.zip | ||
- name: Build package | ||
run: make | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | ||
path: ./dist/fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | ||
if-no-files-found: error | ||
|
||
# This creates a draft release. | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | ||
- name: Publish release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: Release ${{ github.ref_name }} | ||
generate_release_notes: true | ||
files: fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "ref": "refs/tags/v2.63.0" } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist/ | ||
dev/ | ||
*.zip | ||
*.log |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Changelog | ||
|
||
### 2.63 | ||
* Added texture pack and tooling. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
## Developer Guide | ||
|
||
### Requirements | ||
|
||
`bash` and `zip` is all you need to build the package. | ||
|
||
```console | ||
bash scripts/pack.sh | ||
``` | ||
|
||
There is a `Makefile` and a `Dockerfile` to for convenience, but it's not really necessary to use them. | ||
|
||
|
||
The Dockerfile contains all the requirements to run this software. | ||
|
||
- Docker 24.0.0+ (probably works with previous versions too) | ||
|
||
Change the version accordingly. | ||
```console | ||
docker build -t fh2-texture-pack:2.63 . | ||
docker run -v "$(pwd)":/app fh2-texture-pack:2.63 | ||
``` | ||
|
||
To test the GitHub actions locally, you will Act: | ||
|
||
```console | ||
act -e .github/workflows/tag.json --artifact-server-path dist | ||
``` | ||
|
||
or using the Make shorthand: | ||
|
||
```console | ||
make test | ||
``` | ||
|
||
Note that it will eventually fail because the GitHub token is not set, but it still useful | ||
to test the workflow locally and find for most of the errors. | ||
|
||
### Versioning | ||
|
||
The versioning followed in this project follow the mod's versioning to easily identify the | ||
package required for each version of the mod. We use a third number to identify the version of | ||
the package itself, inside the same version of the mod. This is useful to fix bugs or add new | ||
features without having to change the version of the mod itself. | ||
|
||
Pattern: `2.XY.Z`, eg: `2.63.0, 2.63.1` | ||
|
||
### Releasing a new version | ||
|
||
The texture pack might be broken between versions of the mod. Test, and if required fix the | ||
texture pack before generating a release. | ||
|
||
|
||
1. Bump the version: | ||
```console | ||
bash scripts/version.sh 2.XY.Z | ||
``` | ||
|
||
2. Create a tag: | ||
```console | ||
git tag -a v2.XY.Z -m "Release v2.XY.Z" | ||
git push origin v2.XY.Z | ||
``` | ||
|
||
3. If everything goes fine, the release will be created automatically in GitHub. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM ubuntu:latest | ||
# COPY . /app | ||
RUN apt-get update && apt-get install zip make curl -y | ||
RUN curl -s https://raw.githubusercontent.com/nektos/act/master/install.sh | bash | ||
WORKDIR /app | ||
CMD ["pack"] | ||
ENTRYPOINT [ "make" ] |
Oops, something went wrong.