-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from casswedson/releaser-touchup
general ci updates + clean up root directory
- Loading branch information
Showing
19 changed files
with
51 additions
and
45 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
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# Creates a release using compose.py from https://github.com/CleverRaven/Cataclysm-DDA | ||
# | ||
# This action is runs at 12:00 UTC Sunday | ||
# This action is runs at 20:00 UTC Sunday | ||
|
||
name: Publish Release | ||
concurrency: release | ||
on: | ||
schedule: | ||
- cron: '0 12 * * sun' | ||
- cron: '0 20 * * sun' | ||
workflow_dispatch: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -28,16 +29,16 @@ jobs: | |
- name: Generate environmental variables | ||
id: generate_env_vars | ||
run: | | ||
echo "::set-output name=tag_name::${{ steps.get-timestamp.outputs.time }}" | ||
echo "::set-output name=release_name::Cuteclysm Release ${{ steps.get-timestamp.outputs.time }}" | ||
echo "TAG-NAME=${{ steps.get-timestamp.outputs.time }}" >> $GITHUB_OUTPUT | ||
echo "RELEASE-TITLE=Cuteclysm Release ${{ steps.get-timestamp.outputs.time }}" >> $GITHUB_OUTPUT | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check if there is existing git tag | ||
id: tag_check | ||
uses: mukunku/[email protected] | ||
with: | ||
tag: ${{ steps.generate_env_vars.outputs.tag_name }} | ||
tag: ${{ steps.generate_env_vars.outputs.TAG-NAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get Previous tag | ||
|
@@ -46,22 +47,22 @@ jobs: | |
- name: Abort if there are no changes | ||
run: | | ||
# exit 1 if there are no changes, exit 0 if there are changes | ||
git diff ${{ steps.previous_tag.outputs.tag }} | grep "" | ||
git diff ${{ steps.previous_tag.outputs.tag }} | grep -q "" | ||
- name: Push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
if: ${{ steps.tag_check.outputs.exists == 'false' }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ steps.generate_env_vars.outputs.tag_name }} | ||
custom_tag: ${{ steps.generate_env_vars.outputs.TAG-NAME }} | ||
tag_prefix: "" | ||
- name: "Generate release notes" | ||
run: | | ||
gh api \ | ||
--method POST \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
/repos/pixel-32/CDDA-tileset/releases/generate-notes \ | ||
-f tag_name='${{ steps.generate_env_vars.outputs.tag_name }}' \ | ||
/repos/${{github.repository}}/releases/generate-notes \ | ||
-f tag_name='${{ steps.generate_env_vars.outputs.TAG-NAME }}' \ | ||
-f target_commitish='master' \ | ||
-q .body > CHANGELOG.md | ||
- name: Create release | ||
|
@@ -71,8 +72,8 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.generate_env_vars.outputs.tag_name }} | ||
release_name: ${{ steps.generate_env_vars.outputs.release_name }} | ||
tag_name: ${{ steps.generate_env_vars.outputs.TAG-NAME }} | ||
release_name: ${{ steps.generate_env_vars.outputs.RELEASE-NAME }} | ||
body_path: ./CHANGELOG.md | ||
draft: false | ||
prerelease: false | ||
|
@@ -83,42 +84,45 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install musl-dev gcc libvips-dev python3-dev python3-pip python3-wheel | ||
pip3 install pyvips | ||
uses: awalsh128/cache-apt-pkgs-action@v1 | ||
with: | ||
packages: musl python3 python3-pip libvips42 | ||
|
||
# re-installing libvips; caching it won't set it up the way we need it | ||
# still cache it because we'll make it work somehow | ||
- run: sudo apt-get install libvips42 | ||
- run: pip3 install pyvips | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
mkdir build | ||
wget -q -P build https://raw.githubusercontent.com/CleverRaven/Cataclysm-DDA/master/tools/gfx_tools/compose.py \ | ||
wget -q https://raw.githubusercontent.com/CleverRaven/Cataclysm-DDA/master/tools/gfx_tools/compose.py \ | ||
|| echo "Error: Failed to get compose.py" | ||
python3 build/compose.py --use-all --feedback CONCISE --loglevel INFO . build | ||
mkdir build | ||
python3 compose.py --use-all --feedback CONCISE --loglevel INFO . build | ||
release_name=Cuteclysm | ||
mkdir "$release_name" | ||
cp build/*.png "$release_name" | ||
cp build/tile_config.json "$release_name" | ||
cp -r build/* "$release_name" | ||
cp ./tileset.txt "$release_name" | ||
cp ./fallback.png "$release_name" | ||
[ -f "./layering.json" ] && mv "./layering.json" $release_name | ||
zip -r $release_name.zip $release_name | ||
echo ::set-output name=release_name::"$release_name" | ||
echo "RELEASE-NAME=$release_name" >> $GITHUB_OUTPUT | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.release.outputs.upload_url }} | ||
asset_path: ${{ steps.build.outputs.release_name }}.zip | ||
asset_name: ${{ steps.build.outputs.release_name }}.zip | ||
asset_path: ${{ steps.build.outputs.RELEASE-NAME }}.zip | ||
asset_name: ${{ steps.build.outputs.RELEASE-NAME }}.zip | ||
asset_content_type: application/zip | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.