Skip to content

Commit

Permalink
Merge branch 'feat/automated-release' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
opus-42 committed May 12, 2023
2 parents 6900194 + ccfea2a commit e2871cd
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 7 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publishing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build & Publish Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Contributing to Superset API Client

## Setting up your development environment

To be written

## Releasing

> This releasing section is intended for releasers only.
> You won't be able to release without permissions.
### Before releasing
To release you will need to install github CLI:
1. Install github CLI following the instructions here: https://github.com/cli/cli#installation
2. Authenticate with `gh auth login` and follow the instructions.

### Creating a new release
To create a new release:
1. Go to master branch and merge develop branch
2. Release using the release script `bash ./scripts/release.sh`
7 changes: 0 additions & 7 deletions scripts/build.sh

This file was deleted.

20 changes: 20 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# This script will release a new version of the package
VERSION=$1

# Confirming release
echo "Releasing version $VERSION, Continue ?"
select yn in "Yes" "No"; do
case $yn in
Yes ) break;;
No ) exit;;
esac
done

# Creating tag
git tag $VERSION
git push --tags

# Creating release from tag
gh release create $VERSION --generate-notes

0 comments on commit e2871cd

Please sign in to comment.