Merge pull request #1897 from marameref/dello

I Created CI that automatically attaches builds to releases
This commit is contained in:
lazymio 2023-12-25 21:00:37 +08:00 committed by GitHub
commit 53da7c5e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 103 additions and 20 deletions

View File

@ -14,7 +14,6 @@ on:
- "COPYING"
pull_request:
env:
CI: true

51
.github/workflows/prerelease.yml vendored Normal file
View File

@ -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
.github/workflows/release.yml vendored Normal file
View File

@ -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

View File

@ -1,18 +0,0 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 5 * * *'
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.'
days-before-stale: 60
days-before-close: 15
exempt-all-milestones: true
exempt-issue-labels: 'pinned,help wanted,enhancement,bug'
exempt-pr-labels: 'pinned'