From c58c96d0030ff3b2e2458b25bf4b6f6da4c9290f Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:46:05 -0800 Subject: [PATCH] update publish workflow --- .github/workflows/publish.yaml | 19 +---------------- .github/workflows/tag.yaml | 39 ++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 8 ++++++- 3 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/tag.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 666e5a7..5adc0ab 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,4 +1,4 @@ -name: Build Nightly +name: Publish Dockers on: push: @@ -12,20 +12,9 @@ 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 - deploy: name: "Deploy Nightly to Fly.io" runs-on: ubuntu-latest - needs: - - backend-tests - - frontend-tests steps: - uses: actions/checkout@v3 - uses: superfly/flyctl-actions/setup-flyctl@master @@ -34,9 +23,6 @@ jobs: publish-nightly: name: "Publish Nightly" if: github.event_name != 'release' - needs: - - backend-tests - - frontend-tests uses: hay-kot/homebox/.github/workflows/partial-publish.yaml@main with: tag: nightly @@ -46,9 +32,6 @@ jobs: publish-tag: name: "Publish Tag" if: github.event_name == 'release' - needs: - - backend-tests - - frontend-tests uses: hay-kot/homebox/.github/workflows/partial-publish.yaml@main with: release: true diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml new file mode 100644 index 0000000..d0feb3a --- /dev/null +++ b/.github/workflows/tag.yaml @@ -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 }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90095ac..a6fb29f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. 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. \ No newline at end of file +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 \ No newline at end of file