Skip to content

Commit

Permalink
chore: refactor nightly release process (#825)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGedd committed Jul 18, 2024
1 parent b7a5927 commit 26b3859
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 170 deletions.
63 changes: 14 additions & 49 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,6 @@ jobs:
packages: write
uses: ./.github/workflows/release-tests.yaml

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang

- name: Install UDS CLI
uses: ./.github/actions/install-uds-cli

- name: Build CLI
run: |
uds run build-cli-linux-amd
# Upload the contents of the build directory for later stages to use
- name: Upload build artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: build-artifacts
path: build/
retention-days: 1
push:
runs-on: ubuntu-latest
environment: release-nightly
Expand All @@ -48,36 +23,26 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
fetch-tags: 'true'

- name: Setup golang
uses: ./.github/actions/golang

- name: Install tools
uses: ./.github/actions/install-tools

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-artifacts
path: build/
- name: Install UDS CLI
uses: ./.github/actions/install-uds-cli

- name: Create tag
- name: Build binary artifacts
run: |
./hack/create-nightly-tag.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN}}
uds run build-all
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser
version: latest
args: release --clean --verbose --config .goreleaser-nightly.yaml
- name: Update nightly-unstable tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
run: |
# cleanup old release
gh release delete nightly-unstable --cleanup-tag -y || true
# generate new release
gh release create nightly-unstable './build/*' \
-t "nightly-unstable" \
--prerelease \
-n 'Nightly unstable build'
59 changes: 0 additions & 59 deletions .goreleaser-nightly.yaml

This file was deleted.

62 changes: 0 additions & 62 deletions hack/create-nightly-tag.sh

This file was deleted.

8 changes: 8 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ tasks:
setVariables:
- name: BUILD_ARGS
- name: build-all
description: build all the CLI binaries
actions:
- task: build-cli-linux-amd
- task: build-cli-linux-arm
- task: build-cli-mac-intel
- task: build-cli-mac-apple

- name: build-cli-linux-amd
description: build the CLI for Linux AMD64
actions:
Expand Down

0 comments on commit 26b3859

Please sign in to comment.