42 lines
No EOL
1.1 KiB
YAML
42 lines
No EOL
1.1 KiB
YAML
name: ytld-sub release
|
|
on:
|
|
push:
|
|
# publish only when pushed to master
|
|
branches:
|
|
- master
|
|
|
|
# Run tests for any PRs.
|
|
pull_request:
|
|
|
|
jobs:
|
|
release:
|
|
name: release
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get release version
|
|
run:
|
|
export DATE=`date +'%Y.%m.%d'`
|
|
export DATE_COMMIT_COUNT=`git rev-list --count HEAD --since="$(DATE) 00:00:00"`
|
|
|
|
if [ "$(DATE_COMMIT_COUNT)" == "0" ]; then
|
|
export PYPI_VERSION=$(DATE)
|
|
else
|
|
export PYPI_VERSION=`$(DATE).post$(DATE_COMMIT_COUNT)`
|
|
endif
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: $(PYPI_VERSION)
|
|
release_name: ytdl-sub $(PYPI_VERSION)
|
|
body: |
|
|
See https://github.com/jmbannon/ytdl-sub#installation for installation steps
|
|
draft: false
|
|
prerelease: false |