add release auto
This commit is contained in:
30
.gitea/workflows/package.yml
Normal file
30
.gitea/workflows/package.yml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Create Source Package
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
package:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Create source archive
|
||||||
|
run: |
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
|
git archive --format=zip --prefix=${GITHUB_REPOSITORY##*/}-${VERSION}/ HEAD > ${GITHUB_REPOSITORY##*/}-${VERSION}-sources.zip
|
||||||
|
git archive --format=tar.gz --prefix=${GITHUB_REPOSITORY##*/}-${VERSION}/ HEAD > ${GITHUB_REPOSITORY##*/}-${VERSION}-sources.tar.gz
|
||||||
|
|
||||||
|
- name: Upload to release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: ./*-sources.*
|
||||||
|
asset_name: sources-package
|
||||||
|
asset_content_type: application/zip
|
Reference in New Issue
Block a user