This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
Bump actions/checkout from 4.1.7 to 4.2.0 (#72) #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.2.0 | |
- 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 |