Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create release workflow #78

Merged
merged 5 commits into from
Apr 18, 2024
Merged
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
69 changes: 69 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release

on:
push:
branches:
- main

jobs:
build:
name: Build ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Captive Portal
directory: captive-portal
- name: Webserver v2
directory: v2
- name: Webserver v3
directory: v3
steps:
- name: Clone the repo
uses: actions/[email protected]

- name: Set up Node.JS
uses: actions/[email protected]

- name: Install dependencies
run: npm install

- name: Build ${{ matrix.name }}
run: npm run build
working-directory: packages/${{ matrix.directory }}

- uses: actions/[email protected]
with:
name: ${{ matrix.name }}
path: _static/**/*.h

release:
name: Tag and Release
runs-on: ubuntu-latest
needs: build
steps:
# Checkout repo, create new git tag, and git release with artifacts
- name: Checkout the repo
uses: actions/[email protected]

- name: Create a new tag
id: create_tag
run: echo tag=$(date +'%Y%m%d-%H%M%S') >> $GITHUB_OUTPUT

- name: Download Artifacts
uses: actions/[email protected]
with:
path: headers
merge-multiple: true

- name: List files
run: ls -R headers

- name: Create a release
id: create_release
uses: softprops/[email protected]
with:
tag_name: ${{ steps.create_tag.outputs.tag }}
name: Release ${{ steps.create_tag.outputs.tag }}
files: headers/**/*.h
generate_release_notes: true