Skip to content

Commit

Permalink
Create github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasgeiter committed Dec 2, 2021
1 parent 821f997 commit 39c61b6
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 29 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: Version (format 1.2.3)
required: true

jobs:
tag:
name: Tag
runs-on: ubuntu-latest
steps:
- name: Create git tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/v${{ github.event.inputs.version }}",
sha: context.sha
})
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
- name: Install wheel
run: pip install wheel
- name: Build dist
run: python setup.py sdist bdist_wheel
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'windows-latest'
python:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- 'pypy-3.6'
- 'pypy-3.7'
- 'pypy-3.8'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests
run: pytest
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MkDocs Awesome Pages Plugin [![Build Status][travis-status]][travis-link]
# MkDocs Awesome Pages Plugin [![Tests Status][status-tests-badge]][status-tests-link]

*An MkDocs plugin that simplifies configuring page titles and their order*

Expand Down Expand Up @@ -383,8 +383,8 @@ From reporting a bug to submitting a pull request: every contribution is appreci
Report bugs, ask questions and request features using [Github issues][github-issues].
If you want to contribute to the code of this project, please read the [Contribution Guidelines][contributing].

[travis-status]: https://travis-ci.org/lukasgeiter/mkdocs-awesome-pages-plugin.svg?branch=master
[travis-link]: https://travis-ci.org/lukasgeiter/mkdocs-awesome-pages-plugin
[status-tests-badge]: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin/actions/workflows/tests.yml/badge.svg
[status-tests-link]: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin/actions/workflows/tests.yml
[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/
[github-v1]: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin/tree/v1
[github-issues]: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin/issues
Expand Down

0 comments on commit 39c61b6

Please sign in to comment.