Skip to content

How to upload release assets from multiple OSes into one release? #25467

Answered by Simran-B
hungrybluedev asked this question in Actions
Discussion options

You must be logged in to vote

The build job is executed for every OS, including the creation of a GitHub release. You should only create the release once, and then let each build job upload the release assets to the same release. Maybe like this:

name: Create Release Builds

on:
push:
tags:
- "v*" # matches v1.0.1, v1.2, v2, etc

jobs:
once:
name: Create GitHub release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create a release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true

build:
name: Create cross-platfor…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants