Skip to content

Commit 482fabd

Browse files
BUILD Enable GH Action for release
1 parent c06c9e2 commit 482fabd

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
# This workflow is triggered when publishing a GitHub release
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
env:
9+
PYTHONUNBUFFERED: 1
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
name: Start release process
15+
timeout-minutes: 60
16+
steps:
17+
- name: Run release action
18+
id: run_release
19+
uses: SonarSource/gh-action_LT_release@v2
20+
with:
21+
distribute: true
22+
publish_to_binaries: true
23+
attach_artifacts_to_github_release: false
24+
run_rules_cov: false
25+
slack_channel: sonarqube-build
26+
env:
27+
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
28+
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
29+
BINTRAY_TOKEN: ${{ secrets.BINTRAY_TOKEN }}
30+
BURGRX_USER: ${{ secrets.BURGRX_USER }}
31+
BURGRX_PASSWORD: ${{ secrets.BURGRX_PASSWORD }}
32+
CENTRAL_USER: ${{ secrets.CENTRAL_USER }}
33+
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
34+
CIRRUS_TOKEN: ${{ secrets.CIRRUS_TOKEN }}
35+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
36+
PATH_PREFIX: ${{ secrets.BINARIES_PATH_PREFIX }}
37+
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
38+
RELEASE_SSH_USER: ${{ secrets.RELEASE_SSH_USER }}
39+
RELEASE_SSH_KEY: ${{ secrets.RELEASE_SSH_KEY }}
40+
SLACK_API_TOKEN: ${{secrets.SLACK_API_TOKEN }}
41+
- name: Log outputs
42+
if: always()
43+
run: |
44+
echo "${{ steps.run_release.outputs.releasability }}"
45+
echo "${{ steps.run_release.outputs.release }}"
46+
echo "${{ steps.run_release.outputs.distribute_release }}"
47+
- name: Notify success on Slack
48+
uses: Ilshidur/action-slack@2.0.0
49+
env:
50+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
51+
with:
52+
args: "Release successful for {{ GITHUB_REPOSITORY }} by {{ GITHUB_ACTOR }}"
53+
- name: Notify failures on Slack
54+
uses: Ilshidur/action-slack@2.0.0
55+
if: failure()
56+
env:
57+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
58+
with:
59+
args: "Release failed, see the logs at https://github.com/{{ GITHUB_REPOSITORY }}/actions by {{ GITHUB_ACTOR }}"

0 commit comments

Comments
 (0)