-
Notifications
You must be signed in to change notification settings - Fork 568
49 lines (42 loc) · 1.63 KB
/
create-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
jobs:
get_version:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Retrieve version and Changelog
id: get_version
run: |
echo icloudpd_version=$(cat pyproject.toml | grep version= | cut -d'"' -f 2) >> $GITHUB_OUTPUT
echo 'icloudpd_changelog<<EOF' >> $GITHUB_OUTPUT
scripts/extract_releasenotes CHANGELOG.md >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Log version and Changelog
run: |
echo "icloudpd_version=${{steps.get_version.outputs.icloudpd_version}}"
echo "icloudpd_changelog=${{steps.get_version.outputs.icloudpd_changelog}}"
outputs:
icloudpd_version: ${{steps.get_version.outputs.icloudpd_version}}
icloudpd_changelog: ${{steps.get_version.outputs.icloudpd_changelog}}
build_package:
needs: [get_version]
uses: ./.github/workflows/build-package.yml
with:
icloudpd_version: ${{needs.get_version.outputs.icloudpd_version}}
publish:
needs: [get_version, build_package]
uses: ./.github/workflows/publish.yml
with:
icloudpd_version: ${{needs.get_version.outputs.icloudpd_version}}
icloudpd_changelog: ${{needs.get_version.outputs.icloudpd_changelog}}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}