Skip to content

Commit

Permalink
ci: fix packaging of mod.
Browse files Browse the repository at this point in the history
  • Loading branch information
jodli committed Dec 28, 2024
1 parent acc2b7e commit d6a6003
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ jobs:
if [[ "${{ github.ref_name }}" != "$VERSION" ]]; then
echo "Tag name ${{ github.ref_name }} does not match version in info.json: $VERSION"
exit 1
fi
fi
- name: Verify changelog
run: |
echo "Checking changelog for version ${{ github.ref_name }}..."
if ! grep -q "Version: ${{ github.ref_name }}" changelog.txt; then
echo "Changelog does not contain an entry for version ${{ github.ref_name }}"
exit 1
echo "ERROR: Changelog does not contain an entry for version ${{ github.ref_name }}"
exit 1
fi
echo "Changelog verification successful!"
- name: Create zip archive
run: zip -r creative-mod_${{ github.ref_name }}.zip . -x "*.git*" -x ".github*"
- name: Create Factorio mod package
id: package_mod
uses: Roang-zero1/factorio-mod-package@master

- name: Create Release
id: create_release
Expand All @@ -47,6 +50,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: creative-mod_${{ github.ref_name }}.zip
asset_path: ${{ steps.package_mod.outputs.asset_path }}
asset_name: creative-mod_${{ github.ref_name }}.zip
asset_content_type: application/zip

0 comments on commit d6a6003

Please sign in to comment.