Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Github Actions workflow to attach release artifacts to release #10379

Merged
merged 1 commit into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
tags: ["v*"]

permissions:
contents: read
contents: write

jobs:
# first get the list of distros to build for.
Expand Down Expand Up @@ -62,3 +62,29 @@ jobs:
with:
name: python-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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also create the release if it doesn't exist, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it will. per the comments: it will leave it as a "draft", so we can go and fix it up before it gets published.

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 change: 1 addition & 0 deletions changelog.d/10379.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Github Actions workflow to attach release artifacts to release.