mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 00:25:43 +00:00
update publish workflow
This commit is contained in:
parent
948f827494
commit
c58c96d003
3 changed files with 47 additions and 19 deletions
19
.github/workflows/publish.yaml
vendored
19
.github/workflows/publish.yaml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Build Nightly
|
name: Publish Dockers
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -12,20 +12,9 @@ env:
|
||||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backend-tests:
|
|
||||||
name: "Backend Server Tests"
|
|
||||||
uses: hay-kot/homebox/.github/workflows/partial-backend.yaml@main
|
|
||||||
|
|
||||||
frontend-tests:
|
|
||||||
name: "Frontend and End-to-End Tests"
|
|
||||||
uses: hay-kot/homebox/.github/workflows/partial-frontend.yaml@main
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: "Deploy Nightly to Fly.io"
|
name: "Deploy Nightly to Fly.io"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
|
||||||
- backend-tests
|
|
||||||
- frontend-tests
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: superfly/flyctl-actions/setup-flyctl@master
|
- uses: superfly/flyctl-actions/setup-flyctl@master
|
||||||
|
@ -34,9 +23,6 @@ jobs:
|
||||||
publish-nightly:
|
publish-nightly:
|
||||||
name: "Publish Nightly"
|
name: "Publish Nightly"
|
||||||
if: github.event_name != 'release'
|
if: github.event_name != 'release'
|
||||||
needs:
|
|
||||||
- backend-tests
|
|
||||||
- frontend-tests
|
|
||||||
uses: hay-kot/homebox/.github/workflows/partial-publish.yaml@main
|
uses: hay-kot/homebox/.github/workflows/partial-publish.yaml@main
|
||||||
with:
|
with:
|
||||||
tag: nightly
|
tag: nightly
|
||||||
|
@ -46,9 +32,6 @@ jobs:
|
||||||
publish-tag:
|
publish-tag:
|
||||||
name: "Publish Tag"
|
name: "Publish Tag"
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
needs:
|
|
||||||
- backend-tests
|
|
||||||
- frontend-tests
|
|
||||||
uses: hay-kot/homebox/.github/workflows/partial-publish.yaml@main
|
uses: hay-kot/homebox/.github/workflows/partial-publish.yaml@main
|
||||||
with:
|
with:
|
||||||
release: true
|
release: true
|
||||||
|
|
39
.github/workflows/tag.yaml
vendored
Normal file
39
.github/workflows/tag.yaml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
name: Publish Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
env:
|
||||||
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
backend-tests:
|
||||||
|
name: "Backend Server Tests"
|
||||||
|
uses: hay-kot/homebox/.github/workflows/partial-backend.yaml@main
|
||||||
|
|
||||||
|
frontend-tests:
|
||||||
|
name: "Frontend and End-to-End Tests"
|
||||||
|
uses: hay-kot/homebox/.github/workflows/partial-frontend.yaml@main
|
||||||
|
|
||||||
|
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v4
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: latest
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -48,4 +48,10 @@ start command `task: ui:dev`
|
||||||
|
|
||||||
1. The frontend is a Vue 3 app with Nuxt.js that uses Tailwind and DaisyUI for styling.
|
1. The frontend is a Vue 3 app with Nuxt.js that uses Tailwind and DaisyUI for styling.
|
||||||
2. We're using Vitest for our automated testing. you can run these with `task ui:watch`.
|
2. We're using Vitest for our automated testing. you can run these with `task ui:watch`.
|
||||||
3. Tests require the API server to be running and in some cases the first run will fail due to a race condition. If this happens just run the tests again and they should pass.
|
3. Tests require the API server to be running and in some cases the first run will fail due to a race condition. If this happens just run the tests again and they should pass.
|
||||||
|
|
||||||
|
## Publishing Release
|
||||||
|
|
||||||
|
Create a new tag in github with the version number vX.X.X. This will trigger a new release to be created.
|
||||||
|
|
||||||
|
Test -> Goreleaser -> Publish Release -> Trigger Docker Builds -> Deploy Docs + Fly.io Demo
|
Loading…
Reference in a new issue