Skip to content

Commit d9da4e3

Browse files
authored
ci: create a release automatically
1 parent 5449761 commit d9da4e3

File tree

5 files changed

+76
-46
lines changed

5 files changed

+76
-46
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
workflow_call:
9+
10+
jobs:
11+
test:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [macos-13, macos-12, macos-11]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install dependencies
20+
run: |
21+
make venv
22+
- name: Lint
23+
run: |
24+
make lint
25+
- name: Test
26+
run: |
27+
make test

.github/workflows/dev.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
name: Plugin development
1+
name: Development
22

3-
on: [push]
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
47

58
jobs:
6-
build:
7-
8-
runs-on: macos-12
9+
test:
10+
runs-on: macos-latest
911
steps:
1012
- uses: actions/checkout@v4
11-
- name: Set up Python ${{ matrix.python-version }}
12-
uses: actions/setup-python@v4
13-
with:
14-
python-version: '3.8'
1513
- name: Install dependencies
1614
run: |
1715
make venv

.github/workflows/main.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: build-${{ github.ref }}
9+
10+
jobs:
11+
test:
12+
name: Lint and test
13+
uses: gmasse/xbar-plugin-yf-stock-ticker/.github/workflows/ci.yml@main
14+
15+
build:
16+
runs-on: macos-latest
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Get version
23+
id: get-version
24+
run: echo "::set-output name=version::$(./yf_stock_ticker/yf_stock_ticker.sh --version)"
25+
- name: Build
26+
run: |
27+
make build
28+
- name: Upload artifact
29+
uses: actions/upload-artifact@v3
30+
with:
31+
path: yf_stock_ticker_${{ steps.get-version.outputs.version }}.tgz
32+
- name: Create release
33+
uses: ncipollo/release-action@v1
34+
with:
35+
tag: ${{ steps.get-version.outputs.version }}
36+
commit: ${{ github.sha }}
37+
skipIfReleaseExists: true
38+
draft: true
39+
prerelease: false
40+
generateReleaseNotes: true
41+
makeLatest: false
42+
artifacts: yf_stock_ticker_${{ steps.get-version.outputs.version }}.tgz
33.5 KB
Loading

0 commit comments

Comments
 (0)