first commit
This commit is contained in:
80
.github/workflows/release.yml
vendored
Normal file
80
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get version from tag
|
||||
id: get_version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create release tarball
|
||||
run: |
|
||||
mkdir -p dist
|
||||
tar -czf dist/finish-v${{ steps.get_version.outputs.VERSION }}.tar.gz \
|
||||
--exclude='.git' \
|
||||
--exclude='.github' \
|
||||
--exclude='dist' \
|
||||
--exclude='.idea' \
|
||||
--transform "s,^,finish-${{ steps.get_version.outputs.VERSION }}/," \
|
||||
.
|
||||
|
||||
- name: Calculate SHA256
|
||||
id: sha256
|
||||
run: |
|
||||
SHA256=$(sha256sum dist/finish-v${{ steps.get_version.outputs.VERSION }}.tar.gz | awk '{print $1}')
|
||||
echo "SHA256=$SHA256" >> $GITHUB_OUTPUT
|
||||
echo "SHA256: $SHA256"
|
||||
|
||||
- name: Build Debian package
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y debhelper devscripts
|
||||
dpkg-buildpackage -us -uc -b
|
||||
mv ../finish_*.deb dist/ || true
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
dist/*.tar.gz
|
||||
dist/*.deb
|
||||
body: |
|
||||
## Installation
|
||||
|
||||
### Quick Install (Linux/macOS)
|
||||
```bash
|
||||
curl -sSL https://git.appmodel.nl/Tour/finish/main/docs/install.sh | bash
|
||||
```
|
||||
|
||||
### Homebrew (macOS)
|
||||
Update the formula with SHA256: `${{ steps.sha256.outputs.SHA256 }}`
|
||||
|
||||
### Debian/Ubuntu
|
||||
Download the `.deb` file and install:
|
||||
```bash
|
||||
sudo dpkg -i finish_*.deb
|
||||
sudo apt-get install -f # Install dependencies
|
||||
```
|
||||
|
||||
### Docker
|
||||
```bash
|
||||
docker pull ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.VERSION }}
|
||||
```
|
||||
|
||||
## Changelog
|
||||
See [CHANGELOG.md](CHANGELOG.md) for details.
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user