Add release workflow
This commit is contained in:
parent
48d218b49e
commit
7a0f05cd21
1 changed files with 38 additions and 0 deletions
38
.github/workflows/release.yml
vendored
Normal file
38
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: Build and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create release archive
|
||||||
|
run: |
|
||||||
|
mkdir -p ../noctalia-release
|
||||||
|
# Copy all files except .git and .github
|
||||||
|
rsync -av --exclude='.git' --exclude='.github' ./ ../noctalia-release/
|
||||||
|
cd ..
|
||||||
|
tar -czf noctalia-${{ github.ref_name }}.tar.gz noctalia-release/
|
||||||
|
cp noctalia-${{ github.ref_name }}.tar.gz noctalia-latest.tar.gz
|
||||||
|
mv *.tar.gz ${{ github.workspace }}/
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
noctalia-${{ github.ref_name }}.tar.gz
|
||||||
|
noctalia-latest.tar.gz
|
||||||
|
generate_release_notes: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue