Skip to content

Commit 80de4ab

Browse files
vkarehlukefromdc
authored andcommitted
ci: Trigger full release on new tag
Whenever there's a new v* tag, GitHub will use distcheck to generate tarballs, create a proper release, and trigger the mate-desktop.org webhook.
1 parent 42a1736 commit 80de4ab

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

.github/workflows/builds.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,15 @@ jobs:
9898

9999
- name: Build the source code
100100
run: .github/workflows/builds.sh ${{ matrix.build-system }}
101+
102+
- name: IRC notification on failure
103+
if: failure() && (github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
104+
uses: rectalogic/notify-irc@v2
105+
with:
106+
channel: "#mate-dev"
107+
server: "irc.libera.chat"
108+
nickname: "github-marco"
109+
message: |
110+
[marco] ${{ github.actor }}: Build failed for ${{ github.event_name }}
111+
[${{ github.ref_name }}] ${{ github.sha }} - ${{ github.event.head_commit.message || github.event.pull_request.title }}
112+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

.github/workflows/release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ jobs:
2525
run: sudo .github/workflows/mate-desktop.sh ${{env.MATE_DESKTOP_VERSION}} ${{ env.CACHE_PATH }}
2626

2727
- name: Build the source code
28-
run: .github/workflows/builds.sh meson
28+
run: .github/workflows/builds.sh autotools
29+
30+
- name: Generate release tarball and checksums
31+
run: |
32+
make distcheck
33+
TARBALL=$(ls marco-*.tar.xz | head -1)
34+
sha256sum "$TARBALL" > "$TARBALL.sha256"
35+
md5sum "$TARBALL" > "$TARBALL.md5"
2936
3037
- name: Install GH CLI
3138
uses: dev-hanz-ops/install-gh-cli-action@v0.2.1
@@ -34,6 +41,12 @@ jobs:
3441

3542
- name: Create github release
3643
run: |
37-
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes _build/meson-dist/*
44+
gh release create ${{ github.ref_name }} --title "Marco ${{ github.ref_name }}" --generate-notes marco-*.tar.xz marco-*.tar.xz.sha256 marco-*.tar.xz.md5
3845
env:
3946
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Notify MATE release server
49+
run: |
50+
curl -X POST -H "Content-Type: application/json" \
51+
-d "{\"tag\": \"${{ github.ref_name }}\", \"repository\": \"${{ github.repository }}\", \"release_url\": \"https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}\"}" \
52+
https://release.mate-desktop.org/release || echo "::warning::Release notification failed"

0 commit comments

Comments
 (0)