Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update auto configuration and enable CD workflows #1

Merged
merged 2 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .autorc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"git-tag",
"conventional-commits",
"first-time-contributor",
"released"
["released", {"label": "Released", "prereleaseLabel": "Prereleased"}],
["pr-body-labels", { "disabledLabels": ["release", "Release", "Released", "Prereleased", "Skip release"] }]
],
"owner": "smoia",
"owner": "MIPLabCH",
"repo": "nigsp",
"name": "Stefano Moia",
"email": "[email protected]",
Expand Down Expand Up @@ -186,6 +187,20 @@
"releaseType": "none",
"overwrite": true,
"color": "#ffffff"
},
{
"name": "Released",
"description": "This PR has been released!",
"releaseType": "none",
"overwrite": true,
"color": "#ffffff"
},
{
"name": "Prereleased",
"description": "This PR has been released in a prerelease",
"releaseType": "none",
"overwrite": true,
"color": "#ffffff"
}
]
}
78 changes: 39 additions & 39 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# # This workflows will create a release using auto when a PR is merged in master.

# name: Auto-release on PR merge
name: Auto-release on PR merge

# on:
# # ATM, this is the closest trigger to a PR merging
# push:
# branches:
# - master
on:
# ATM, this is the closest trigger to a PR merging
push:
branches:
- master

# jobs:
# auto-release:
# runs-on: ubuntu-18.04
# # Set skip ci to avoid loops
# if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
# # Set bash as default shell for jobs
# defaults:
# run:
# shell: bash
# steps:
# - name: Checkout source
# uses: actions/checkout@v2
# with:
# # Fetch all history for all branches and tags
# fetch-depth: 0
# # Use token with write access to the repo
# token: ${{ secrets.GH_TOKEN }}
# - name: Download and install latest auto
# env:
# # OS can be linux, macos, or win
# OS: linux
# # Retrieve URL of latest auto, download it, unzip it, and give exec permissions.
# run: |
# curl -vkL -o - $( curl -s https://api.github.com/repos/intuit/auto/releases/latest \
# | grep browser_download_url | grep ${OS} | awk -F'"' '{print $4}') \
# | gunzip > ~/auto
# chmod a+x ~/auto
# - name: Create release without version prefix
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# # Run auto release, don't use 'v' prefix, and be verbose
# run: |
# ~/auto shipit --no-version-prefix -v
jobs:
auto-release:
runs-on: ubuntu-18.04
# Set skip ci to avoid loops
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
# Set bash as default shell for jobs
defaults:
run:
shell: bash
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
# Fetch all history for all branches and tags
fetch-depth: 0
# Use token with write access to the repo
token: ${{ secrets.GH_TOKEN }}
- name: Download and install latest auto
env:
# OS can be linux, macos, or win
OS: linux
# Retrieve URL of latest auto, download it, unzip it, and give exec permissions.
run: |
curl -vkL -o - $( curl -s https://api.github.com/repos/intuit/auto/releases/latest \
| grep browser_download_url | grep ${OS} | awk -F'"' '{print $4}') \
| gunzip > ~/auto
chmod a+x ~/auto
- name: Create release without version prefix
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# Run auto release, don't use 'v' prefix, and be verbose
run: |
~/auto shipit --no-version-prefix -v
50 changes: 25 additions & 25 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# # This workflows will upload a Python Package using Twine when a release is created
# # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# name: Upload Python Package
name: Upload Python Package

# on:
# release:
# types: [created]
on:
release:
types: [created]

# jobs:
# deploy:
jobs:
deploy:

# runs-on: ubuntu-18.04
runs-on: ubuntu-18.04

# steps:
# - name: Checkout source
# uses: actions/checkout@v2
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.6'
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install setuptools wheel twine
# - name: Build and publish
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# python setup.py sdist bdist_wheel
# twine upload dist/*
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*