Skip to content

Push Continuous Deployment #10

Push Continuous Deployment

Push Continuous Deployment #10

Workflow file for this run

name: Push Continuous Deployment
on:
push:
branches:
- "1.21"
- "1.20.4"
paths:
- "config/**"
- "mods/**"
- "resourcepacks/**"
- "index.toml"
- "pack.toml"
workflow_dispatch:
jobs:
export_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate branch name and version
id: version
run: |
echo "branch_name=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_OUTPUT
- name: Export
run: |
docker run --rm -v $(pwd):/workspace dalbitresb12/packwiz modrinth export --output "winters-tweaks-${{ steps.version.outputs.branch_name }}-${{ steps.version.outputs.date }}.mrpack"
- name: Deploy to GitHub
uses: Kir-Antipov/[email protected]
with:
github-tag: "${{ steps.version.outputs.branch_name }}-${{ steps.version.outputs.date }}"
github-generate-changelog: true
github-token: ${{ secrets.GH_TOKEN }}
name: "${{ steps.version.outputs.branch_name }}-${{ steps.version.outputs.date }}"
version: "${{ steps.version.outputs.branch_name }}-${{ steps.version.outputs.date }}"
files: "*.mrpack"
loaders: fabric
game-versions: "${{ steps.version.outputs.branch_name }}"
- name: Deploy to Modrinth
uses: Kir-Antipov/[email protected]
with:
modrinth-id: faNqEX4o
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-unfeature-mode: any
name: "${{ steps.version.outputs.branch_name }}-${{ steps.version.outputs.date }}"
version: "${{ steps.version.outputs.branch_name }}-${{ steps.version.outputs.date }}"
files: "*.mrpack"
loaders: fabric
game-versions: "${{ steps.version.outputs.branch_name }}"
changelog: "Changelog: https://www.github.com/RWolfyo/winters-tweaks/releases/tag/${{ steps.version.outputs.date }}/"