Repository navigation
69 lines (61 loc) · 1.97 KB
/
Copy pathinstead-cli.yml
File metadata and controls
69 lines (61 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: instead-cli
on:
workflow_dispatch:
inputs:
version:
description: "Version for the artifact name. Defaults to VERSION from data/core/core.lua"
required: false
type: string
workflow_call:
inputs:
version:
description: "Version for the artifact name. Defaults to VERSION from data/core/core.lua"
required: false
type: string
outputs:
artifact:
description: "Name of the uploaded artifact"
value: ${{ jobs.build.outputs.artifact }}
version:
description: "Resolved version"
value: ${{ jobs.build.outputs.version }}
jobs:
build:
name: build
runs-on: ubuntu-22.04
timeout-minutes: 30
outputs:
artifact: ${{ steps.pack.outputs.artifact }}
version: ${{ steps.ver.outputs.version }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/version
id: ver
with:
version: ${{ inputs.version }}
- name: Install Packages
run: |
sudo apt-get update -qq
sudo apt-get install -y build-essential gcc-mingw-w64-i686 mingw-w64-i686-dev binutils-mingw-w64-i686 zip
- name: Cache libiconv
uses: actions/cache@v6
with:
path: extra/instead-cli/external
key: libiconv-${{ runner.os }}-${{ hashFiles('extra/instead-cli/libiconv.sh') }}
- name: Build
run: make -C extra/instead-cli dist
- name: Package
id: pack
run: |
VER='${{ steps.ver.outputs.version }}'
rm -rf dist
mkdir -p dist/instead-cli
cp -r extra/instead-cli/build/dist/. dist/instead-cli/
(cd dist && zip -r "instead-cli-$VER.zip" instead-cli)
echo "artifact=instead-cli-$VER" >> "$GITHUB_OUTPUT"
- name: Publish Artifact
uses: actions/upload-artifact@v7
with:
name: ${{ steps.pack.outputs.artifact }}
path: dist/instead-cli-*.zip
retention-days: 7