-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (61 loc) · 1.74 KB
/
build-and-release.yml
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
name: Main workflow file
on:
push:
branches:
- develop
- develop-*
permissions:
contents: write
env:
CMAKE_TOOLCHAIN_FILE: toolchains/mingw-w64-i686-docker.cmake
jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: mkdir -p ~/image-cache
- id: image-cache
uses: actions/cache@v3
with:
path: ~/image-cache
key: image-cache-${{ runner.os }}
- if: steps.image-cache.outputs.cache-hit != 'true'
run: |
docker-compose build builder
docker save -o ~/image-cache/builder.tar shmocz/ra2yrcpp
build-and-verify:
runs-on: ubuntu-latest
needs: build-docker-image
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- id: image-cache
uses: actions/cache@v3
with:
path: ~/image-cache
key: image-cache-${{ runner.os }}
- if: steps.image-cache.outputs.cache-hit == 'true'
run: |
docker load -i ~/image-cache/builder.tar
- name: Build and verify the library
uses: ./.github/actions/build
- name: Delete Previous Release
uses: dev-drprasad/[email protected]
with:
tag_name: latest
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_release: true
continue-on-error: true
- name: Upload New Release.
uses: softprops/action-gh-release@v1
with:
name: Latest
tag_name: latest
body: Latest ra2yrcpp build.
files: |
cbuild/mingw-w64-i686-docker-Release/ra2yrcpp.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}