Skip to content

Commit

Permalink
fix cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
tier940 committed Sep 22, 2023
1 parent c78d7f4 commit 0084a01
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Check if tag already exists
run: |
if git rev-parse --verify --quiet "v${{ github.event.inputs.version }}"; then
echo "Version ${{ github.event.inputs.version }} already exists, aborting workflow."
exit 1
fi
- name: Set the version
run: |
echo "GregTech Expert 2 ${{ env.FULL_VERSION }}" > ./overrides/resources/custommainmenu/version.txt
Expand All @@ -53,7 +60,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
cache: pip

- name: Install dependencies
Expand Down Expand Up @@ -85,8 +92,9 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: "v${{ github.event.inputs.version }}"
draft: false
prerelease: false
generate_release_notes: true
files: |
Expand All @@ -95,9 +103,8 @@ jobs:
./${{ env.NAME }}-${{ env.FULL_VERSION }}-server.zip
- name: Upload Curseforge
uses: henkelmax/[email protected]
uses: juraj-hrivnak/[email protected]
with:
api-token: ${{ secrets.CF_API_TOKEN }}
project-id: '565238'
modpack-path: ./${{ env.NAME }}-${{ env.FULL_VERSION }}-cf.zip
modpack-server-path: ./${{ env.NAME }}-${{ env.FULL_VERSION }}-server.zip
Expand Down

0 comments on commit 0084a01

Please sign in to comment.