Skip to content

Commit

Permalink
workflows 2
Browse files Browse the repository at this point in the history
  • Loading branch information
rniii committed Aug 6, 2024
1 parent 8e1f34f commit 60204a2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ on:
release:
types: [published, edited]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
build-linux:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- name: Linux
os: ubuntu-latest
- name: Windows
os: windows-latest

steps:
- uses: actions/checkout@v4
Expand All @@ -18,11 +30,17 @@ jobs:
- name: Build
run: |
cabal update
cabal build --enable-satic --project-file=cabal.project.release
file "$(cabal list-bin maid)" | grep "statically linked" -q
cabal build --enable-static --project-file=cabal.project.release
echo "binpath=$(cabal list-bin --project-file=cabal.project.release maid)" >> $GITHUB_ENV
- name: Publish
if: runner.os == 'Linux'
run: |
gh release upload "$GITHUB_REF_NAME" "${{env.binpath}}#maid-$GITHUB_REF_NAME-x86_64-linux"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
if: runner.os == 'Windows'
run: |
gh release upload "$(cabal list-bin maid)#maid-$VERSION-x86_64-linux"
gh release upload "$GITHUB_REF_NAME" "${{env.binpath}}#maid-$GITHUB_REF_NAME-x86_64-windows.exe"
env:
VERSION: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Maid is a task runner like make which uses readable markdown files for its comma

## Usage

In your `README.md`, put `<!-- maid-tasks -->` under the desired section for your commands
In your `README.md` or `CONTRIBUTING.md`, put `<!-- maid-tasks -->` under the desired section for your commands

Here's this very README.md:

Expand All @@ -31,9 +31,3 @@ Of course, you can use maid to run its own tasks!
``` sh
cabal build
```

### test

``` sh
cabal test
```

0 comments on commit 60204a2

Please sign in to comment.