GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
ci: add automated releases (#489)
lars-bergerf6f183336d88
diff --git a/.github/actions/release-with-artifacts/action.yaml b/.github/actions/release-with-artifacts/action.yamlnew file mode 100644index 00000000..dbb57565--- /dev/null+++ b/.github/actions/release-with-artifacts/action.yaml@@ -0,0 +1,39 @@+name: Release with artifacts++inputs:+ is-prerelease:+ required: true++runs:+ using: composite+ steps:+ - name: Download artifacts (win-x64)+ uses: actions/download-artifact@v4+ with:+ name: glazewm-win-x64-${{ github.sha }}+ path: artifacts/win-x64++ - name: Download artifacts (win-x86)+ uses: actions/download-artifact@v4+ with:+ name: glazewm-win-x86-${{ github.sha }}+ path: artifacts/win-x86++ - uses: glzr-io/actions/semantic-release@main+ with:+ is-prerelease: ${{ inputs.is-prerelease }}+ prerelease_tag: nightly+ gh-publish: true+ gh-draft-release: ${{ !inputs.is-prerelease }}+ gh-token: ${{ github.token }}+ gh-assets: |+ [+ {+ "path": "artifacts/win-x64/GlazeWM.exe",+ "name": "GlazeWM_x64_${nextRelease.gitTag}"+ },+ {+ "path": "artifacts/win-x86/GlazeWM.exe",+ "name": "GlazeWM_x86_${nextRelease.gitTag}"+ }+ ]diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.ymldeleted file mode 100644index 8bfc8480..00000000--- a/.github/linters/.yaml-lint.yml+++ /dev/null@@ -1,57 +0,0 @@-----###########################################-# These are the rules used for #-# linting all the yaml files in the stack #-# NOTE: #-# You can disable line with: #-# # yamllint disable-line #-###########################################-rules:- braces:- level: warning- min-spaces-inside: 0- max-spaces-inside: 0- min-spaces-inside-empty: 1- max-spaces-inside-empty: 5- brackets:- level: warning- min-spaces-inside: 0- max-spaces-inside: 0- min-spaces-inside-empty: 1- max-spaces-inside-empty: 5- colons:- level: warning- max-spaces-before: 0- max-spaces-after: 1- commas:- level: warning- max-spaces-before: 0- min-spaces-after: 1- max-spaces-after: 1- comments: disable- comments-indentation: disable- document-end: disable- document-start:- level: warning- present: true- empty-lines:- level: warning- max: 2- max-start: 0- max-end: 0- hyphens:- level: warning- max-spaces-after: 1- indentation:- level: warning- spaces: consistent- indent-sequences: true- check-multi-line-strings: false- key-duplicates: enable- line-length:- level: warning- max: 80- allow-non-breakable-words: true- allow-non-breakable-inline-mappings: true- new-line-at-end-of-file: disable- trailing-spaces: disablediff --git a/.github/workflows/build.yaml b/.github/workflows/build.yamlnew file mode 100644index 00000000..475b4285--- /dev/null+++ b/.github/workflows/build.yaml@@ -0,0 +1,34 @@+name: Build++on:+ workflow_call:+ pull_request:+ types: [opened, synchronize, reopened]++jobs:+ build:+ runs-on: windows-latest+ strategy:+ matrix:+ runtime: [win-x64, win-x86]+ steps:+ - uses: actions/checkout@v4++ - uses: actions/setup-dotnet@v3+ with:+ dotnet-version: 7.x++ - run: >+ dotnet publish GlazeWM.App/GlazeWM.App.csproj+ --configuration Release+ --runtime ${{ matrix.runtime }}+ --output GlazeWM.App/publish/+ --self-contained+ -p:PublishSingleFile=true+ -p:IncludeAllContentForSelfExtract=true++ - uses: actions/upload-artifact@v4+ with:+ name: glazewm-${{ matrix.runtime }}-${{ github.sha }}+ path: GlazeWM.App/publish/GlazeWM.exe+ if-no-files-found: errordiff --git a/.github/workflows/lint-check.yaml b/.github/workflows/lint-check.yamlnew file mode 100644index 00000000..738ae42a--- /dev/null+++ b/.github/workflows/lint-check.yaml@@ -0,0 +1,15 @@+name: Lint check++on: push++jobs:+ lint-check:+ runs-on: windows-latest+ steps:+ - uses: actions/checkout@v4++ - uses: actions/setup-dotnet@v3+ with:+ dotnet-version: 7.x++ - run: dotnet format --verify-no-changesdiff --git a/.github/workflows/pr-title-check.yaml b/.github/workflows/pr-title-check.yamlnew file mode 100644index 00000000..083b4ff8--- /dev/null+++ b/.github/workflows/pr-title-check.yaml@@ -0,0 +1,13 @@+name: PR title check++on:+ pull_request:+ types: [opened, edited, synchronize, reopened]++jobs:+ pr-title-check:+ runs-on: ubuntu-latest+ steps:+ - uses: glzr-io/actions/semantic-prs@main+ with:+ gh-token: ${{ secrets.GITHUB_TOKEN }}diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yamlnew file mode 100644index 00000000..f5fc4b59--- /dev/null+++ b/.github/workflows/pre-release.yaml@@ -0,0 +1,26 @@+name: Pre-release++on:+ push:+ branches: [main]++permissions:+ contents: write+ issues: write+ pull-requests: write++jobs:+ build:+ uses: ./.github/workflows/build.yaml++ pre-release:+ needs: build+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ with:+ fetch-depth: 0++ - uses: ./.github/actions/release-with-artifacts+ with:+ is-prerelease: truediff --git a/.github/workflows/pull-request-linter.yml b/.github/workflows/pull-request-linter.ymldeleted file mode 100644index 7b8e7e79..00000000--- a/.github/workflows/pull-request-linter.yml+++ /dev/null@@ -1,23 +0,0 @@-----name: Pull-Request-Linter--on: pull_request--jobs:- super-lint:- name: Pull-Request-Linter- runs-on: ubuntu-latest- steps:- - name: Checkout Code- uses: actions/checkout@v3- with:- fetch-depth: 0- - name: Run Super Linter- uses: github/super-linter@v4- env:- DEFAULT_BRANCH: master- GITHUB_TOKEN: $({ secrets.GITHUB_TOKEN })- VALIDATE_CSHARP: true- VALIDATE_YAML: true- VALIDATE_XML: true- VALIDATE_EDITORCONFIG: truediff --git a/.github/workflows/push-linter.yml b/.github/workflows/push-linter.ymldeleted file mode 100644index 79e5bf5a..00000000--- a/.github/workflows/push-linter.yml+++ /dev/null@@ -1,24 +0,0 @@-----name: Push-Linter--on: push--jobs:- super-lint:- name: Push-Linter- runs-on: ubuntu-latest- steps:- - name: Checkout Code- uses: actions/checkout@v3- with:- fetch-depth: 0- - name: Run Super Linter- uses: github/super-linter@v4- env:- VALIDATE_ALL_CODEBASE: false- DEFAULT_BRANCH: master- GITHUB_TOKEN: $({ secrets.GITHUB_TOKEN })- VALIDATE_CSHARP: true- VALIDATE_YAML: true- VALIDATE_XML: true- VALIDATE_EDITORCONFIG: truediff --git a/.github/workflows/release.yaml b/.github/workflows/release.yamlnew file mode 100644index 00000000..f0283aef--- /dev/null+++ b/.github/workflows/release.yaml@@ -0,0 +1,24 @@+name: Release++on: workflow_dispatch++permissions:+ contents: write+ issues: write+ pull-requests: write++jobs:+ build:+ uses: ./.github/workflows/build.yaml++ pre-release:+ needs: build+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ with:+ fetch-depth: 0++ - uses: ./.github/actions/release-with-artifacts+ with:+ is-prerelease: false