Skip to content

Nightly Release

Nightly Release #4

name: Nightly Release
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' ## Every day at midnight UTC
permissions:
contents: read
jobs:
test:

Check failure on line 11 in .github/workflows/nightly-release.yaml

View workflow run for this annotation

GitHub Actions / Nightly Release

Invalid workflow file

The workflow is not valid. .github/workflows/nightly-release.yaml (Line: 11, Col: 3): The workflow must contain at least one job with no dependencies.
runs-on: ubuntu-latest
needs: checkout
steps:
- name: Run tests
uses: ./.github/workflows/release-tests.yaml
push:
runs-on: ubuntu-latest
environment: release
needs: test
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- 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: Create tag
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
# try to create a tag, if it already exists, update it
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/nightly',
sha: context.sha
}).catch(err => {
if (err.status !== 422) throw err;
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/nightly',
sha: context.sha
});
})
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser
version: latest
args: release --clean --verbose --config .goreleaser-nightly.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}