Skip to content

Commit

Permalink
Add github action to build
Browse files Browse the repository at this point in the history
  • Loading branch information
azuwis committed Jan 4, 2024
1 parent 7851357 commit 29ea1ba
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build
on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
workflow_dispatch:
inputs:
debug:
description: Enable debug
type: boolean
required: false
default: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azuwis/nix-action@main
with:
key: zigbee2mqtt-networkmap-${{ hashFiles('flake.*') }}
debug: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }}
credential: ${{ secrets.TTYD_CREDENTIAL }}
- uses: cachix/cachix-action@v12
with:
name: azuwis
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
run: |
nix -L develop .# --profile ~/.local/state/nix/profiles/shell --command yarn build
test -e ./dist/zigbee2mqtt-networkmap.js
- uses: actions/upload-artifact@v4
with:
name: zigbee2mqtt-networkmap
path: ./dist/zigbee2mqtt-networkmap.js
- uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: ./dist/zigbee2mqtt-networkmap.js
- uses: azuwis/nix-action@post

0 comments on commit 29ea1ba

Please sign in to comment.