forked from MirrorHub/synapse
Github Actions workflow to attach release artifacts to release (#10379)
This commit is contained in:
parent
ae81ec428d
commit
2d8b60e0f2
2 changed files with 28 additions and 1 deletions
28
.github/workflows/release-artifacts.yml
vendored
28
.github/workflows/release-artifacts.yml
vendored
|
@ -13,7 +13,7 @@ on:
|
||||||
tags: ["v*"]
|
tags: ["v*"]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# first get the list of distros to build for.
|
# first get the list of distros to build for.
|
||||||
|
@ -62,3 +62,29 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: python-dist
|
name: python-dist
|
||||||
path: dist/*
|
path: dist/*
|
||||||
|
|
||||||
|
# if it's a tag, create a release and attach the artifacts to it
|
||||||
|
attach-assets:
|
||||||
|
name: "Attach assets to release"
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
needs:
|
||||||
|
- build-debs
|
||||||
|
- build-sdist
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download all workflow run artifacts
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
- name: Build a tarball for the debs
|
||||||
|
run: tar -cvJf debs.tar.xz debs
|
||||||
|
- name: Attach to release
|
||||||
|
uses: softprops/action-gh-release@a929a66f232c1b11af63782948aa2210f981808a # PR#109
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
python-dist/*
|
||||||
|
debs.tar.xz
|
||||||
|
# if it's not already published, keep the release as a draft.
|
||||||
|
draft: true
|
||||||
|
# mark it as a prerelease if the tag contains 'rc'.
|
||||||
|
prerelease: ${{ contains(github.ref, 'rc') }}
|
||||||
|
|
1
changelog.d/10379.misc
Normal file
1
changelog.d/10379.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Add Github Actions workflow to attach release artifacts to release.
|
Loading…
Reference in a new issue