File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed
Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and test
2+
3+ on :
4+ pull_request : {}
5+ push :
6+ branches :
7+ - ' *'
8+ tags :
9+ - ' *'
10+
11+ # Must set Settings -> Actions -> General -> Workflow permissions to
12+ # "Read and write permissions"
13+ permissions :
14+ contents : write
15+
16+ jobs :
17+ build :
18+ runs-on : ubuntu-latest
19+
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ arch : ["x64", "x86"]
24+
25+ steps :
26+ - uses : actions/checkout@v3
27+
28+ - name : Apply x86 patch
29+ if : matrix.arch == 'x86'
30+ run : patch -p1 -i src/variant-x86.patch
31+
32+ - name : Generate archive name and version string
33+ id : filename
34+ env :
35+ ARCH : ${{ matrix.arch }}
36+ run : |
37+ GIT_VERSION="$(git describe --tags --always)"
38+ echo "version=${GIT_VERSION:1}" >> $GITHUB_OUTPUT
39+ echo "archive=w64devkit-$ARCH-${GIT_VERSION:1}" >> $GITHUB_OUTPUT
40+
41+ - name : Build
42+ run : |
43+ docker build -t w64devkit .
44+ docker run --rm w64devkit > ${{ steps.filename.outputs.archive }}.exe
45+
46+ - name : Upload artifact
47+ uses : actions/upload-artifact@v2
48+ with :
49+ name : ${{ steps.filename.outputs.archive }}
50+ path : w64devkit-*.exe
51+
52+ - name : Create Release
53+ if : startsWith(github.ref, 'refs/tags/')
54+ uses : softprops/action-gh-release@v1
55+ with :
56+ name : ${{ steps.filename.outputs.version }}
57+ files : w64devkit-*.exe
58+ draft : true
You can’t perform that action at this time.
0 commit comments