-
-
Notifications
You must be signed in to change notification settings - Fork 160
83 lines (81 loc) · 2.85 KB
/
push-continous-delivery.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
on:
push:
branches:
- dev
- test-builds
- actions-testing
name: Continuous Delivery
jobs:
buildNightlyDocker:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/cache@v3
with:
path: /tmp/buildxcache
key: ${{ runner.os }}-docker-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-buildx-
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
echo "${DOCKER_PASSWORD}" | docker login -u ${DOCKER_USERNAME} --password-stdin
- name: Build/Push Nightly Docker
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--output "type=image,push=true" \
--tag difegue/lanraragi:nightly \
--cache-from "type=local,src=/tmp/buildxcache" \
--cache-to "type=local,dest=/tmp/buildxcache" \
--file ./tools/build/docker/Dockerfile .
exportDockerRootFS:
name: Build and export Docker rootfs for Windows build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker Build and export
run: |
docker build -t difegue/lanraragi -f ./tools/build/docker/Dockerfile --build-arg INSTALL_PARAMETER=-w .
docker create --name rootfs difegue/lanraragi
docker export --output=package.tar rootfs
- name: Upload rootfs
uses: actions/upload-artifact@v1
with:
name: package
path: package.tar
buildNightlyWSL:
name: Build Nightly Windows Package
needs: exportDockerRootFS
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Download package
uses: actions/download-artifact@v1
with:
name: package
- name: Build MSI Installer
shell: powershell
run: |
[array]$installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -property installationpath
# Get first line of installPath in case we have multiple VS installs
Import-Module (Join-Path $installPath[0] "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
# Import the VS shell module
Enter-VsDevShell -VsInstallPath $installPath[0] -SkipAutomaticLocation
$ErrorActionPreference = 'Continue'
git submodule init
git submodule update
choco install nuget.commandline
./tools/build/windows/build.ps1
- name: Upload Installer
uses: actions/upload-artifact@v1
with:
name: LANraragi.msi
path: ./tools/build/windows/Karen/Setup/bin/LANraragi.msi