This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (77 loc) · 2.24 KB
/
synology.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
84
85
name: Build Synology Package (SPK)
on:
push:
branches:
- main
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
name: Build and package
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.3
- name: Checkout
uses: actions/checkout@v4.1.7
- name: Build
env:
CGO_ENABLED: 0
GOOS: linux
GOARCH: amd64
GOAMD64: v2
GOPROXY: "https://proxy.golang.org"
run: go build -v
- name: Get current time
run: echo "TIMESTAMP=$(date +'%Y.%m.%d-%s')" >> $GITHUB_ENV
- name: Package
env:
SPK_ARCH: x86_64
SPK_PACKAGE_VERSION: ${{ env.TIMESTAMP }}
SPK_PACKAGE_SUFFIX: latest
run: ./.ci/build-package.sh
- name: Archive package
uses: actions/upload-artifact@v4
with:
name: Synology package
path: synology/mielesolar-x86_64-latest.spk
- name: Update latest release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
synology/mielesolar-x86_64-latest.spk
- name: Generate repository JSON
env:
SPK_ARCH: x86_64
SPK_PACKAGE_VERSION: ${{ env.TIMESTAMP }}
SPK_PACKAGE_SUFFIX: latest
SPK_PACKAGE_URL: https://github.com/IngmarStein/mielesolar/releases/download/latest/mielesolar-x86_64-latest.spk
run: |
mkdir -p repo
./synology/repo/index.json.sh > ./repo/index.json
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: repo
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4