Skip to content

Commit

Permalink
using new itchio workflow in cxreiff/github_workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cxreiff committed Oct 15, 2024
1 parent 7d08671 commit f70e28c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 93 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:

jobs:
check:
uses: cxreiff/github_workflows/.github/workflows/rust_checks.yml@main
permissions:
checks: write
uses: cxreiff/github_workflows/.github/workflows/rust_checks.yml@main
secrets:
DEDICATED_TOKEN: ${{ secrets.DEDICATED_TOKEN }}
with:
linux_dependencies: libasound2-dev libudev-dev
92 changes: 11 additions & 81 deletions .github/workflows/itchio.yml
Original file line number Diff line number Diff line change
@@ -1,87 +1,17 @@
name: itchio
name: itch.io

on:
workflow_run:
workflows: ['release']
types: [completed]
branches:
- 'main'

env:
ITCH_TARGET: cxreiff/lifecycler
workflows: [Release]
types: [completed]

jobs:
# determine the version number for this workflow.
get-version:
runs-on: ubuntu-latest
steps:
- name: Get version number from tag
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "${GITHUB_OUTPUT}"
outputs:
# use the input from workflow dispatch, or fall back to the git tag.
version: ${{ inputs.version || steps.tag.outputs.tag }}

# strategy:
# matrix:
# include:
# - target: x86_64-unknown-linux-gnu
# os: ubuntu-latest
# name: linux
# - target: x86_64-apple-darwin
# os: macos-latest
# name: macos
# - target: x86_64-pc-windows-msvc
# os: windows-latest
# name: windows

# upload all packages to itch.io.
upload-to-itch:
runs-on: ubuntu-latest
needs:
- get-version
- get-itch-target
- upload-assets
env:
VERSION: ${{ needs.get-version.outputs.version }}
steps:
- name: download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: release.yml
workflow_conclusion: success
branch: main
skip_unpack: false
if_no_artifact_found: fail
path: tars

- name: folders for butler
run: |
ls tars
mkdir upload
for channel in $(ls tars); do
echo "${channel}"
mkdir "upload/${channel%%.*}"; mv tars/${channel} "upload/${channel%%.*}"
done
- name: install butler
run: |
curl -L -o butler.zip 'https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default'
unzip butler.zip
chmod +x butler
./butler -V
- name: upload all packages to itch.io
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_CREDENTIALS }}
run: |
for channel in $(ls upload); do
./butler push \
--fix-permissions \
--userversion='${{ env.VERSION }}' \
upload/"${channel}" \
'${{ env.ITCH_TARGET }}':"${channel#package-}"
done
itch-io:
uses: cxreiff/github_workflows/.github/workflows/rust_release_itchio.yml@main
secrets:
DEDICATED_TOKEN: ${{ secrets.DEDICATED_TOKEN }}
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
with:
itch_target: cxreiff/lifecycler
workflow_run_id: ${{ github.event.workflow_run.id }}

4 changes: 2 additions & 2 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pull-requests: write
contents: write
secrets:
RELEASE_PLZ_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
DEDICATED_TOKEN: ${{ secrets.DEDICATED_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
with:
linux_dependencies: libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
linux_dependencies: libasound2-dev libudev-dev
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
test:
uses: cxreiff/github_workflows/.github/workflows/rust_tests.yml@main
secrets:
DEDICATED_TOKEN: ${{ secrets.DEDICATED_TOKEN }}
with:
crate_type: "bin"
linux_dependencies: "libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev"
crate_type: bin
linux_dependencies: libasound2-dev libudev-dev
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ homepage = "https://github.com/cxreiff/lifecycler"
categories = ["games", "command-line-interface"]
keywords = ["bevy", "ratatui", "terminal", "tui", "aquarium"]

[features]
default = ["wayland"]
wayland = ["bevy/wayland"]

[dependencies]
bevy = "0.14.2"
bevy_atmosphere = "0.10.0"
Expand Down Expand Up @@ -72,5 +68,3 @@ pr-run-mode = "plan"
[workspace.metadata.dist.dependencies.apt]
libasound2-dev = "*"
libudev-dev = "*"
libwayland-dev = "*"
libxkbcommon-dev = "*"

0 comments on commit f70e28c

Please sign in to comment.