Skip to content

Commit

Permalink
ci: create a release automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
gmasse authored Sep 27, 2023
1 parent 5449761 commit d9da4e3
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 46 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
pull_request:
branches:
- main
workflow_dispatch:
workflow_call:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-12, macos-11]

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
make venv
- name: Lint
run: |
make lint
- name: Test
run: |
make test
16 changes: 7 additions & 9 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Plugin development
name: Development

on: [push]
on:
push:
branches-ignore:
- main

jobs:
build:

runs-on: macos-12
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
make venv
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/main.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build

on:
push:
branches:
- main

concurrency: build-${{ github.ref }}

jobs:
test:
name: Lint and test
uses: gmasse/xbar-plugin-yf-stock-ticker/.github/workflows/ci.yml@main

build:
runs-on: macos-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Get version
id: get-version
run: echo "::set-output name=version::$(./yf_stock_ticker/yf_stock_ticker.sh --version)"
- name: Build
run: |
make build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: yf_stock_ticker_${{ steps.get-version.outputs.version }}.tgz
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.get-version.outputs.version }}
commit: ${{ github.sha }}
skipIfReleaseExists: true
draft: true
prerelease: false
generateReleaseNotes: true
makeLatest: false
artifacts: yf_stock_ticker_${{ steps.get-version.outputs.version }}.tgz
Binary file modified assets/screenshot_xbar_plugin_browser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d9da4e3

Please sign in to comment.