Skip to content

Commit

Permalink
refactor action and add badge (#1)
Browse files Browse the repository at this point in the history
* refactor action and add badge
* rearrange conditions
* splitting workflows
  • Loading branch information
pwnyprod authored Jul 18, 2022
1 parent 8344d74 commit 11909ac
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/main.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'Main'
name: 'Build'

on:
push:
branches: [ "main" ]
branches: [ "master" ]
pull_request:
branches: [ "main" ]
branches: [ "master" ]

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
Expand All @@ -20,7 +20,11 @@ jobs:
- name: Build Application
run: "./build.cmd"

- uses: ncipollo/release-action@v1
- uses: actions/upload-artifact@v3
with:
artifacts: "TwitchNotify.exe"
token: ${{ secrets.GITHUB_TOKEN }}
name: application
if-no-files-found: error
path: |
TwitchNotify.exe
TwitchNotify.ini
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'Release'

on:
push:
tags:
- '*.*.*'

jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3

- name: Build Application
run: "./build.cmd"

- uses: actions/upload-artifact@v3
with:
name: application
if-no-files-found: error
path: |
TwitchNotify.exe
TwitchNotify.ini
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: application

- uses: ncipollo/release-action@v1
with:
artifacts: "TwitchNotify.exe,TwitchNotify.ini"
token: ${{ secrets.GITHUB_TOKEN }}
body: "You need to Download both files in the same Folder. The configuration for the ini file is described in the [Readme.md](Readme.md)"

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Twitch Notify

[![Build](https://github.com/pwnyprod/TwitchNotify/actions/workflows/build.yml/badge.svg)](https://github.com/pwnyprod/TwitchNotify/actions/workflows/build.yml)

Simple utility that sits in system tray, monitors Twitch users and
notifies with Windows 10 toast notifications when they go live.

Expand Down

0 comments on commit 11909ac

Please sign in to comment.