Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eac54f8c79 |
@@ -5,15 +5,10 @@ name: Release
|
|||||||
# macOS and Windows); only the publish half differs: GitHub needs the v4
|
# macOS and Windows); only the publish half differs: GitHub needs the v4
|
||||||
# artifact backend and fills the release with `gh`.
|
# artifact backend and fills the release with `gh`.
|
||||||
#
|
#
|
||||||
# Gitea reads both .gitea/workflows and .github/workflows, so without a guard it
|
# Every job is gated on `github.server_url == 'https://github.com'`, so this file
|
||||||
# would also try to run this file and fail on @v4 and `gh`. (Gitea reports
|
# runs only on GitHub. Gitea runs its own copy in .gitea/workflows; should a
|
||||||
# github.server_url as https://github.com, so that cannot tell the two apart.)
|
# Gitea instance also read .github/workflows, the guard skips these jobs there
|
||||||
# Instead every job is gated on a repository variable GITHUB_RELEASE=true, which
|
# so they never fail on the @v4 artifact backend or `gh`.
|
||||||
# is set only in the GitHub repository's settings — so on Gitea, where it is
|
|
||||||
# absent, these jobs are skipped and the .gitea file is the one that runs.
|
|
||||||
#
|
|
||||||
# To enable on GitHub: Settings → Secrets and variables → Actions → Variables →
|
|
||||||
# New variable, name GITHUB_RELEASE, value true.
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ["v*"]
|
tags: ["v*"]
|
||||||
@@ -28,7 +23,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.asset }}
|
name: ${{ matrix.asset }}
|
||||||
if: ${{ vars.GITHUB_RELEASE == 'true' }}
|
if: ${{ github.server_url == 'https://github.com' }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -149,7 +144,7 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
name: Publish release
|
name: Publish release
|
||||||
needs: build
|
needs: build
|
||||||
if: ${{ vars.GITHUB_RELEASE == 'true' }}
|
if: ${{ github.server_url == 'https://github.com' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|||||||
Reference in new issue
Block a user