Skip to content

Release

Release #7

Workflow file for this run

# This is a workflow to package and upload on CurseForge and GitHub Releases using BigWigs/Packager
name: Release
# Controls when the action will run.
on:
# Package alpha version at 06:00 UTC every Thursday
schedule:
- cron: '0 6 * * THU'
# Triggers the workflow on tag events
push:
tags: '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# checkout@v2 doesn't pull tags by default now, which results in super long auto changelog, so pull all history incl. tags
# alternative would be to use checkout@v1
fetch-tags: 'true'
lfs: 'true'
- name: Get latest three tags
id: tags
run: |
# fetch three last tag and out as parameters
tags=($(git tag --sort=-creatordate | head -n 3))
if [ ${#tags[@]} -lt 3 ]; then
echo "Less than 3 tags found. Please adjust fetch depth."
exit 1
fi
echo "LATEST_TAG=${tags[0]}" >> $GITHUB_ENV
echo "PREVIOUS_TAG=${tags[1]}" >> $GITHUB_ENV
echo "THIRD_LATEST_TAG=${tags[2]}" >> $GITHUB_ENV
- name: Fetch commits up to the third latest tag
run: |
# pull three tags before last commit
git fetch --depth=200 origin ${{ env.THIRD_LATEST_TAG }}
- name: Display commit messages between tags
run: |
echo "Commit messages between ${{ env.THIRD_LATEST_TAG }} and ${{ env.PREVIOUS_TAG }}:"
git log ${{ env.THIRD_LATEST_TAG }}..${{ env.PREVIOUS_TAG }} --oneline
# once cloned, we just run the GitHub Action for the packager project
- name: Package and release
uses: BigWigsMods/packager@master
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
#WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_KEY }}