forked from antoine-de/mimirsbrunn
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 2.1 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: release package (ES2)
on:
push:
tags:
- '*'
workflow_dispatch:
schedule:
- cron: '0 2 1 * *'
jobs:
package:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- debian_version: 8
debian_name: jessie
rust: "1.66"
- debian_version: 11
debian_name: bullseye
rust: "1.66"
container: navitia/debian${{ matrix.debian_version }}_dev
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Build package
run: ./scripts/build_deb.sh ${{ matrix.debian_name }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: debian-package-release
path: ./scripts/deb-scratch/*
- name: Github Release
uses: softprops/action-gh-release@v1
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: slack notification (the job has failed)
if: failure()
run: |
echo '{"text":":Warning: Github Actions: build packages for branch release failed (ES2) ! (https://github.com/hove-io/mimirsbrunn/actions/workflows/release.yml)."}' | curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data-binary @- ${{secrets.SLACK_NAVITIA_AUTOCOMPLETE_TEAM_URL}}
publish:
runs-on: ubuntu-latest
needs: package
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: slack notification (the job succeeded)
run: |
version=$(make version)
echo '{"text":":information_source: Github Actions: build packages for branch release succeded - New packages mimir ' $VERSION 'is available (ES2)"}' | curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data-binary @- ${{secrets.SLACK_NAVITIA_AUTOCOMPLETE_TEAM_URL}}