Skip to content

Merge pull request #145 from iamKarthikBK/fix-satp-checks #49

Merge pull request #145 from iamKarthikBK/fix-satp-checks

Merge pull request #145 from iamKarthikBK/fix-satp-checks #49

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Get version
id: get_version
run: |
echo "::set-output name=version::$(grep -P -o '(?<=## \[).*(?=\])' -m1 CHANGELOG.md)"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install setuptools wheel twine
# - name: Script
# uses: ammaraskar/sphinx-action@master
# with:
# docs-folder: "docs/"
# pre-build-command: " apt-get update --allow-releaseinfo-change -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended"
# build-command: " make latexpdf "
- name: Publish package
if: github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: ${{ secrets.PYPIUSERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPIPASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Extract release notes
id: extract-release-notes
if: github.ref == 'refs/heads/master'
uses: ffurrer2/extract-release-notes@v1
- name: Tag
if: github.ref == 'refs/heads/master'
run: |
git tag ${{ steps.get_version.outputs.version }}
git push origin ${{ steps.get_version.outputs.version }}
- name: Create Release
id: create_release
if: github.ref == 'refs/heads/master'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
release_branch: refs/heads/master
release_name: ${{ steps.get_version.outputs.version }}
tag_name: ${{ steps.get_version.outputs.version }}
body: ${{ steps.extract-release-notes.outputs.release_notes }}
draft: false
prerelease: false
#- name: Upload Release Asset
# id: upload-release-asset
# if: github.ref == 'refs/heads/master'
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./docs/build/latex/riscv_config.pdf
# asset_name: riscv_config.pdf
# asset_content_type: application/pdf