-
-
Notifications
You must be signed in to change notification settings - Fork 387
112 lines (106 loc) · 3.06 KB
/
package.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Package and release
on:
push:
paths:
- '.github/workflows/package*.yml'
- '.github/workflows/pypi-release.yml'
- 'installer/**'
- 'picard/**'
- 'po/**.po'
- 'resources/win10/**'
- 'scripts/package/*'
- 'scripts/pyinstaller/*'
- 'test/**'
- 'appxmanifest.xml.in'
- 'picard.icns'
- 'picard.ico'
- 'picard.spec'
- 'requirements*.txt'
- 'setup.py'
- 'tagger.py.in'
- 'win.version-info.txt.in'
pull_request:
permissions: {}
jobs:
package-macos:
uses: ./.github/workflows/package-macos.yml
strategy:
fail-fast: false
secrets: inherit
package-windows:
uses: ./.github/workflows/package-windows.yml
strategy:
fail-fast: false
secrets: inherit
package-pypi:
uses: ./.github/workflows/package-pypi.yml
strategy:
fail-fast: false
secrets: inherit
permissions:
id-token: write
github-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- package-macos
- package-windows
- package-pypi
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: actions/download-artifact@v4
with:
name: macos-app-10.14
path: artifacts/
# - uses: actions/download-artifact@v4
# with:
# name: windows-signed-app
# path: artifacts/
- uses: actions/download-artifact@v4
with:
name: windows-store-app
path: artifacts/
- uses: actions/download-artifact@v4
with:
name: windows-installer
path: artifacts/
- uses: actions/download-artifact@v4
with:
name: windows-portable
path: artifacts/
- uses: actions/download-artifact@v4
with:
name: picard-sdist
path: artifacts/
- name: Generate checksums
run: |
cd artifacts
sha256sum * > SHA256SUMS
- name: Prepare changelog
id: changelog
continue-on-error: true
run: |
PICARD_VERSION=$(python -c "import picard; print(picard.__version__)")
echo "version=$PICARD_VERSION" >> $GITHUB_OUTPUT
if [[ "$PICARD_VERSION" =~ (a|b|rc|dev) ]]; then
echo "::notice::Releasing pre-release $PICARD_VERSION"
echo "prerelease=true" >> $GITHUB_OUTPUT
else
echo "::notice::Releasing production release $PICARD_VERSION"
fi
echo -e "*Please refer to the [download page](https://picard.musicbrainz.org/downloads/) for official download locations.*\n" > changes-$PICARD_VERSION.md
./scripts/tools/changelog-for-version.py $PICARD_VERSION >> changes-$PICARD_VERSION.md
- name: Create release
uses: softprops/action-gh-release@v2
with:
name: MusicBrainz Picard ${{ steps.changelog.outputs.version }}
body_path: changes-${{ steps.changelog.outputs.version }}.md
prerelease: ${{ steps.changelog.outputs.prerelease }}
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}