Skip to content

Commit

Permalink
Pre release
Browse files Browse the repository at this point in the history
  • Loading branch information
maxisoft committed Aug 13, 2020
1 parent aaac275 commit 171ca58
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
82 changes: 82 additions & 0 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This is a basic workflow to help you get started with Actions

name: Release a new pre version

on:
push:
tags:
- 'pre*'


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
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:

- name: Extract tag name
id: tag
uses: actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
return context.payload.ref.replace("refs/tags/pre", '');
- name: Export tag
run: |
echo "${{ steps.tag.outputs.result }}"
echo "::set-env name=SETUP_VERSION_OVERWRITE::${{ steps.tag.outputs.result }}"
echo "::set-env name=TWINE_USERNAME::__token__"
echo "::set-env name=TWINE_PASSWORD::${{ secrets.TESTPYPI_TOKEN }}"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install deps
run: |
pip install -r test-requirements.txt &&
pip install --upgrade setuptools wheel twine
timeout-minutes: 3

- name: Build wheel
run: |
python setup.py sdist bdist_wheel
timeout-minutes: 3

-
name: Check with Twine
run: |
twine check dist/*
timeout-minutes: 3

-
name: Upload with Twine
run: |
twine upload --disable-progress-bar --non-interactive --repository testpypi dist/*
timeout-minutes: 3

- uses: actions/upload-artifact@v2
with:
name: Release Build
path: dist/*

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Pre-release ${{ github.ref }}
draft: true
prerelease: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
![Unit Test dev and main branch](https://github.com/maxisoft/Freenom-dns-updater/workflows/Unit%20Test%20dev%20and%20main%20branch/badge.svg)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/Freenom-dns-updater)


A tool written in python to update [freenom](http://Freenom.com)'s dns records

## Main Features
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# To use a consistent encoding
from codecs import open
from os import path
import os

here = path.abspath(path.dirname(__file__))

Expand All @@ -24,10 +25,12 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.1.1',
version=os.environ.get('SETUP_VERSION_OVERWRITE', '1.1.1'),

description="A tool to update freenom's dns records",

long_description=long_description,
long_description_content_type="text/markdown",

# The project's main homepage.
url='https://github.com/maxisoft/Freenom-dns-updater',
Expand Down

0 comments on commit 171ca58

Please sign in to comment.