summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/release.yml83
1 files changed, 83 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..63ff97c
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,83 @@
+# .github/workflows/release.yml
+name: Release (Linux tarball + Windows zip)
+
+on:
+ push:
+ tags:
+ - "v*.*.*"
+
+permissions:
+ contents: write
+
+jobs:
+ build-linux:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: stable
+
+ - name: Build tarball
+ run: make tarball
+
+ - name: Upload artifact (Linux)
+ uses: actions/upload-artifact@v4
+ with:
+ name: linux-dist
+ path: |
+ dist/*.tar.gz
+ dist/*.buildinfo
+ dist/*.sha256
+ if-no-files-found: error
+
+ build-windows:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: stable
+
+ - name: Run PowerShell build
+ shell: pwsh
+ run: ./build.ps1
+
+ - name: Upload artifact (Windows)
+ uses: actions/upload-artifact@v4
+ with:
+ name: windows-dist
+ path: |
+ dist/*.zip
+ dist/*.buildinfo
+ dist/*.sha256
+ if-no-files-found: error
+
+ release:
+ runs-on: ubuntu-latest
+ needs: [build-linux, build-windows]
+ steps:
+ - name: Download Linux artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: linux-dist
+ path: upload
+
+ - name: Download Windows artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: windows-dist
+ path: upload
+
+ - name: Create GitHub Release
+ uses: softprops/action-gh-release@v2
+ with:
+ generate_release_notes: true
+ prerelease: ${{ contains(github.ref_name, '-') }}
+ files: |
+ upload/*.tar.gz
+ upload/*.zip
+ upload/*.sha256
+ upload/*.buildinfo
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}