Skip to content

Commit

Permalink
chore: try to fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoguen committed Oct 19, 2024
1 parent c25456d commit db40761
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 56 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
- "ubuntu-latest"

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

- name: Set up Python 3.x
uses: actions/setup-python@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -69,5 +69,5 @@ jobs:
python3 -m pip install -r tests/requirements.txt
fi
- name: Run calibre Python ${{ matrix.python-version }} tests
- name: Run tests
run: ./scripts/build.sh test
38 changes: 8 additions & 30 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,41 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Lint

'on':
"on":
push:
branches:
- '*'
- "*"
pull_request:

jobs:
black:
runs-on: ubuntu-latest

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

- name: Set up Python 3.x
uses: actions/setup-python@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: "3.11"

- uses: psf/black@main

shellcheck:
runs-on: ubuntu-latest

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

- uses: jgoguen/gh-actions/shellcheck@main

yamllint:
runs-on: ubuntu-latest

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

- name: yamllint
uses: jgoguen/gh-actions/yaml-lint@main
with:
source: ./.github/workflows/

vale:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: File Changes
id: file_changes
uses: trilom/file-changes-action@v1.2.4

- name: Lint Markdown files
uses: errata-ai/vale-action@reviewdog
with:
files: '${{ steps.file_changes.outputs.files_modified }}'
styles: |
https://github.com/errata-ai/Microsoft/releases/latest/download/Microsoft.zip
https://github.com/errata-ai/proselint/releases/latest/download/proselint.zip
https://github.com/errata-ai/Joblint/releases/latest/download/Joblint.zip
https://github.com/errata-ai/write-good/releases/latest/download/write-good.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32 changes: 11 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,35 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Populate Release

'on':
"on":
push:
tags:
- 'v*'
- "v*"

jobs:
upload-assets:
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"

steps:
- name: Install repo dependencies
run: sudo apt install -y gettext

- name: Check out release tag
uses: actions/checkout@v2.2.0
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.11"

- name: Fetch calibre
run: ./scripts/update-calibre.py 3
run: ./scripts/update-calibre.py

- name: Build ZIP files
run: ./scripts/build.sh build

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

- name: Upload release assets
uses: softprops/action-gh-release@v1
with:
files: '*.zip'
files: "*.zip"
make_latest: true

0 comments on commit db40761

Please sign in to comment.