|
1 |
| -name: itchio |
| 1 | +name: itch.io |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | workflow_run:
|
5 |
| - workflows: ['release'] |
6 |
| - types: [completed] |
7 |
| - branches: |
8 |
| - - 'main' |
9 |
| - |
10 |
| -env: |
11 |
| - ITCH_TARGET: cxreiff/lifecycler |
| 5 | + workflows: [Release] |
| 6 | + types: [completed] |
12 | 7 |
|
13 | 8 | jobs:
|
14 |
| - # determine the version number for this workflow. |
15 |
| - get-version: |
16 |
| - runs-on: ubuntu-latest |
17 |
| - steps: |
18 |
| - - name: Get version number from tag |
19 |
| - id: tag |
20 |
| - run: echo "tag=${GITHUB_REF#refs/tags/}" >> "${GITHUB_OUTPUT}" |
21 |
| - outputs: |
22 |
| - # use the input from workflow dispatch, or fall back to the git tag. |
23 |
| - version: ${{ inputs.version || steps.tag.outputs.tag }} |
24 |
| - |
25 |
| - # strategy: |
26 |
| - # matrix: |
27 |
| - # include: |
28 |
| - # - target: x86_64-unknown-linux-gnu |
29 |
| - # os: ubuntu-latest |
30 |
| - # name: linux |
31 |
| - # - target: x86_64-apple-darwin |
32 |
| - # os: macos-latest |
33 |
| - # name: macos |
34 |
| - # - target: x86_64-pc-windows-msvc |
35 |
| - # os: windows-latest |
36 |
| - # name: windows |
37 |
| - |
38 |
| - # upload all packages to itch.io. |
39 |
| - upload-to-itch: |
40 |
| - runs-on: ubuntu-latest |
41 |
| - needs: |
42 |
| - - get-version |
43 |
| - - get-itch-target |
44 |
| - - upload-assets |
45 |
| - env: |
46 |
| - VERSION: ${{ needs.get-version.outputs.version }} |
47 |
| - steps: |
48 |
| - - name: download artifact |
49 |
| - id: download-artifact |
50 |
| - uses: dawidd6/action-download-artifact@v6 |
51 |
| - with: |
52 |
| - github_token: ${{secrets.GITHUB_TOKEN}} |
53 |
| - workflow: release.yml |
54 |
| - workflow_conclusion: success |
55 |
| - branch: main |
56 |
| - skip_unpack: false |
57 |
| - if_no_artifact_found: fail |
58 |
| - path: tars |
59 |
| - |
60 |
| - - name: folders for butler |
61 |
| - run: | |
62 |
| - ls tars |
63 |
| - mkdir upload |
64 |
| - for channel in $(ls tars); do |
65 |
| - echo "${channel}" |
66 |
| - mkdir "upload/${channel%%.*}"; mv tars/${channel} "upload/${channel%%.*}" |
67 |
| - done |
68 |
| -
|
69 |
| - - name: install butler |
70 |
| - run: | |
71 |
| - curl -L -o butler.zip 'https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default' |
72 |
| - unzip butler.zip |
73 |
| - chmod +x butler |
74 |
| - ./butler -V |
75 |
| -
|
76 |
| - - name: upload all packages to itch.io |
77 |
| - env: |
78 |
| - BUTLER_API_KEY: ${{ secrets.BUTLER_CREDENTIALS }} |
79 |
| - run: | |
80 |
| - for channel in $(ls upload); do |
81 |
| - ./butler push \ |
82 |
| - --fix-permissions \ |
83 |
| - --userversion='${{ env.VERSION }}' \ |
84 |
| - upload/"${channel}" \ |
85 |
| - '${{ env.ITCH_TARGET }}':"${channel#package-}" |
86 |
| - done |
| 9 | + itch-io: |
| 10 | + uses: cxreiff/github_workflows/.github/workflows/rust_release_itchio.yml@main |
| 11 | + secrets: |
| 12 | + DEDICATED_TOKEN: ${{ secrets.DEDICATED_TOKEN }} |
| 13 | + BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} |
| 14 | + with: |
| 15 | + itch_target: cxreiff/lifecycler |
| 16 | + workflow_run_id: ${{ github.event.workflow_run.id }} |
87 | 17 |
|
0 commit comments