mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
ci: Do not run upload action on forks
This commit is contained in:
parent
1ec7c3843d
commit
89e4d7b787
1
.github/workflows/gen_centos7_continuous.yml
vendored
1
.github/workflows/gen_centos7_continuous.yml
vendored
@ -143,6 +143,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_centos7_tag.yml
vendored
1
.github/workflows/gen_centos7_tag.yml
vendored
@ -90,6 +90,7 @@ jobs:
|
||||
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
prerelease: true
|
||||
|
1
.github/workflows/gen_centos8_continuous.yml
vendored
1
.github/workflows/gen_centos8_continuous.yml
vendored
@ -126,6 +126,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_centos8_tag.yml
vendored
1
.github/workflows/gen_centos8_tag.yml
vendored
@ -71,6 +71,7 @@ jobs:
|
||||
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
prerelease: true
|
||||
|
@ -119,6 +119,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.deb;wezterm-*.xz;wezterm-*.tar.gz"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_debian10.3_tag.yml
vendored
1
.github/workflows/gen_debian10.3_tag.yml
vendored
@ -68,6 +68,7 @@ jobs:
|
||||
run: "bash ci/deploy.sh"
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: |
|
||||
wezterm-*.deb
|
||||
|
@ -119,6 +119,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.deb;wezterm-*.xz;wezterm-*.tar.gz"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_debian11_tag.yml
vendored
1
.github/workflows/gen_debian11_tag.yml
vendored
@ -68,6 +68,7 @@ jobs:
|
||||
run: "bash ci/deploy.sh"
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: |
|
||||
wezterm-*.deb
|
||||
|
@ -136,6 +136,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.deb;wezterm-*.xz;wezterm-*.tar.gz"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_debian9.12_tag.yml
vendored
1
.github/workflows/gen_debian9.12_tag.yml
vendored
@ -87,6 +87,7 @@ jobs:
|
||||
run: "bash ci/deploy.sh"
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: |
|
||||
wezterm-*.deb
|
||||
|
@ -112,6 +112,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_fedora31_tag.yml
vendored
1
.github/workflows/gen_fedora31_tag.yml
vendored
@ -65,6 +65,7 @@ jobs:
|
||||
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
prerelease: true
|
||||
|
@ -112,6 +112,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_fedora32_tag.yml
vendored
1
.github/workflows/gen_fedora32_tag.yml
vendored
@ -65,6 +65,7 @@ jobs:
|
||||
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
prerelease: true
|
||||
|
@ -112,6 +112,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_fedora33_tag.yml
vendored
1
.github/workflows/gen_fedora33_tag.yml
vendored
@ -65,6 +65,7 @@ jobs:
|
||||
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
prerelease: true
|
||||
|
@ -112,6 +112,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_fedora34_tag.yml
vendored
1
.github/workflows/gen_fedora34_tag.yml
vendored
@ -65,6 +65,7 @@ jobs:
|
||||
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
prerelease: true
|
||||
|
1
.github/workflows/gen_macos_continuous.yml
vendored
1
.github/workflows/gen_macos_continuous.yml
vendored
@ -112,6 +112,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "WezTerm-*.zip"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_macos_tag.yml
vendored
1
.github/workflows/gen_macos_tag.yml
vendored
@ -85,6 +85,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "WezTerm-*.zip"
|
||||
prerelease: true
|
||||
|
@ -119,6 +119,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.deb;wezterm-*.xz;wezterm-*.tar.gz;*.AppImage;*.zsync"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_ubuntu16_tag.yml
vendored
1
.github/workflows/gen_ubuntu16_tag.yml
vendored
@ -68,6 +68,7 @@ jobs:
|
||||
run: "bash ci/appimage.sh"
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: |
|
||||
wezterm-*.deb
|
||||
|
@ -105,6 +105,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.deb;wezterm-*.xz;wezterm-*.tar.gz"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_ubuntu18_tag.yml
vendored
1
.github/workflows/gen_ubuntu18_tag.yml
vendored
@ -62,6 +62,7 @@ jobs:
|
||||
run: "bash ci/deploy.sh"
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: |
|
||||
wezterm-*.deb
|
||||
|
@ -119,6 +119,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "wezterm-*.deb;wezterm-*.xz;wezterm-*.tar.gz"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_ubuntu20.04_tag.yml
vendored
1
.github/workflows/gen_ubuntu20.04_tag.yml
vendored
@ -68,6 +68,7 @@ jobs:
|
||||
run: "bash ci/deploy.sh"
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: |
|
||||
wezterm-*.deb
|
||||
|
1
.github/workflows/gen_windows_continuous.yml
vendored
1
.github/workflows/gen_windows_continuous.yml
vendored
@ -85,6 +85,7 @@ jobs:
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: "WezTerm-*.zip;WezTerm-*.exe"
|
||||
release-tag: "nightly"
|
||||
|
1
.github/workflows/gen_windows_tag.yml
vendored
1
.github/workflows/gen_windows_tag.yml
vendored
@ -58,6 +58,7 @@ jobs:
|
||||
run: "bash ci/deploy.sh"
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event.repository.fork == false
|
||||
with:
|
||||
files: |
|
||||
WezTerm-*.zip
|
||||
|
@ -47,15 +47,18 @@ class RunStep(Step):
|
||||
|
||||
|
||||
class ActionStep(Step):
|
||||
def __init__(self, name, action, params=None, env=None):
|
||||
def __init__(self, name, action, params=None, env=None, condition=None):
|
||||
self.name = name
|
||||
self.action = action
|
||||
self.params = params
|
||||
self.env = env
|
||||
self.condition = condition
|
||||
|
||||
def render(self, f, env):
|
||||
f.write(f" - name: {yv(self.name)}\n")
|
||||
f.write(f" uses: {self.action}\n")
|
||||
if self.condition:
|
||||
f.write(f" if: {self.condition}\n")
|
||||
if self.params:
|
||||
f.write(" with:\n")
|
||||
for k, v in self.params.items():
|
||||
@ -372,6 +375,7 @@ cargo build --all --release""",
|
||||
ActionStep(
|
||||
"Upload to Nightly Release",
|
||||
action="wez/upload-release-assets@releases/v1",
|
||||
condition="github.event.repository.fork == false",
|
||||
params={
|
||||
"files": ";".join(patterns),
|
||||
"release-tag": "nightly",
|
||||
@ -392,6 +396,7 @@ cargo build --all --release""",
|
||||
ActionStep(
|
||||
"Upload to Tagged Release",
|
||||
action="softprops/action-gh-release@v1",
|
||||
condition="github.event.repository.fork == false",
|
||||
params={"files": "\n".join(patterns), "prerelease": True},
|
||||
env={
|
||||
"GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}",
|
||||
|
Loading…
Reference in New Issue
Block a user