Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Build

on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Build
run: cargo build --release --features cli-wrapper

- name: Package
run: |
$tag = "${{ contains(github.ref_name, '/') && github.sha || github.ref_name }}"
Compress-Archive -Force -Path `
target/release/xlauth.exe, `
target/release/xlauth-cli.exe `
-DestinationPath "xlauth-windows-$tag.zip"

- uses: actions/upload-artifact@v4
with:
name: windows-build
path: xlauth-windows-*.zip

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build
run: cargo build --release

- name: Package
run: |
tag="${{ contains(github.ref_name, '/') && github.sha || github.ref_name }}"
tar -czf "xlauth-linux-${tag}.tar.gz" -C target/release xlauth

- uses: actions/upload-artifact@v4
with:
name: linux-build
path: xlauth-linux-*.tar.gz

release:
needs: [ build-windows, build-linux ]
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: windows-build
path: dist

- uses: actions/download-artifact@v4
with:
name: linux-build
path: dist

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/xlauth-windows-*.zip
dist/xlauth-linux-*.tar.gz
name: "xlauth ${{ github.ref_name }}"
body: "Automated release for ${{ github.ref_name }}"
23 changes: 0 additions & 23 deletions .github/workflows/rust.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Build files
/target
/.vscode

# IDE files
/.vscode
/.idea
Loading