Skip to content

Commit

Permalink
ci: tweaking ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Apr 4, 2023
1 parent 08957fd commit 4b93425
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 63 deletions.
85 changes: 43 additions & 42 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,70 @@ on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
publish-release:
name: Publish Release
runs-on: macos-11

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.8
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.8

- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.1.6
- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.4.2

- name: Install python dependencies
run: poetry install
- name: Install python dependencies
run: poetry install

- uses: pre-commit/action@v3.0.0
name: "Linters and formatters check"
with:
extra_args: --all-files --show-diff-on-failure
- uses: pre-commit/action@v3.0.0
name: "Linters and formatters check"
with:
extra_args: --all-files --show-diff-on-failure

- name: Build TinyBar.app
run: PYTHONPATH="." poetry run python3 setup.py py2app
- name: Build TinyBar.app
run: PYTHONPATH="." poetry run python3 setup.py py2app

- name: Zip executable
run: zip -vr TinyBar.zip dist/TinyBar.app -x "*.DS_Store"
- name: Zip executable
run: zip -vr TinyBar.zip dist/TinyBar.app -x "*.DS_Store"

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: TinyBar.zip
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: TinyBar.zip

update-website:
name: Update Website
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Copy latest README
run: |
cp README.md index.md
- name: Copy latest README
run: |
cp README.md index.md
- name: Push latest index.md
uses: dmnemec/copy_file_to_another_repo_action@main
env:
- name: Push latest index.md
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
with:
source_file: 'index.md'
destination_repo: 'aorumbayev/tinybar'
destination_branch: 'gh-pages'
user_email: 'millionalgos@pm.me'
user_name: 'TinyBarBot'
commit_message: '🤖 Updating website with latest content 📜'
with:
source_file: "index.md"
destination_repo: "aorumbayev/tinybar"
destination_branch: "gh-pages"
user_email: "millionalgos@pm.me"
user_name: "TinyBarBot"
commit_message: "🤖 Updating website with latest content 📜"
42 changes: 21 additions & 21 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ jobs:
runs-on: macos-11

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.8
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.8

- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.1.6
- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.4.2

- name: Install python dependencies
run: poetry install
- name: Install python dependencies
run: poetry install

- uses: pre-commit/action@v3.0.0
name: "Linters and formatters check"
with:
extra_args: --all-files --show-diff-on-failure
- uses: pre-commit/action@v3.0.0
name: "Linters and formatters check"
with:
extra_args: --all-files --show-diff-on-failure

- name: Build TinyBar.app
run: PYTHONPATH="." poetry run python3 setup.py py2app
- name: Build TinyBar.app
run: PYTHONPATH="." poetry run python3 setup.py py2app

0 comments on commit 4b93425

Please sign in to comment.