Skip to content

Commit

Permalink
Merge pull request #1897 from marameref/dello
Browse files Browse the repository at this point in the history
I Created CI that automatically attaches builds to releases
  • Loading branch information
wtdcode authored Dec 25, 2023
2 parents 43597af + 612fb4e commit 53da7c5
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-uc2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- "COPYING"
pull_request:


env:
CI: true

Expand Down Expand Up @@ -546,4 +545,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
path: ./${{ matrix.config.artifact }}
name: ${{ matrix.config.artifact }}
name: ${{ matrix.config.artifact }}
51 changes: 51 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
tags:
- 'rc*'
workflow_dispatch:

name: Upload Prerelease Assets

jobs:
build:
name: Upload Release Assets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create 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

- name: create artifacts directory
run: mkdir artifact
working-directory: ./

- uses: dawidd6/action-download-artifact@v2
id: download-artifact
with:
workflow: build-uc2.yml
workflow_conclusion: success
path: artifact

- name: Display structure of downloaded files
run: ls -R
working-directory: artifact


- name: Upload Release Assets
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
assets_path: artifact
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
tags:
- 'v*'
workflow_dispatch:

name: Upload Release Assets

jobs:
build:
name: Upload Release Assets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create 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: false

- name: create artifacts directory
run: mkdir artifact
working-directory: ./

- uses: dawidd6/action-download-artifact@v2
id: download-artifact
with:
workflow: build-uc2.yml
workflow_conclusion: success
path: artifact

- name: Display structure of downloaded files
run: ls -R
working-directory: artifact


- name: Upload Release Assets
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
assets_path: artifact
18 changes: 0 additions & 18 deletions .github/workflows/stale.yml

This file was deleted.

0 comments on commit 53da7c5

Please sign in to comment.