forked from d2iq-archive/marathon
-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (60 loc) · 1.86 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
---
name: Release
on:
push:
branches:
- 'criteo/*'
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch --prune --unshallow
./criteo_tag_commit.sh
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build artifact
run: sbt clean universal:packageZipTarball
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Identify artifact
id: identify_artifact
run: ./identify_artifact.sh
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt test
- name: Publish artifact
uses: actions/upload-artifact@v2-preview
if: success()
with:
name: ${{ steps.identify_artifact.outputs.artifact }}
path: ${{ steps.identify_artifact.outputs.path }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.identify_artifact.outputs.version }}"
release_name: "v${{ steps.identify_artifact.outputs.version }}"
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.identify_artifact.outputs.path }}
asset_name: ${{ steps.identify_artifact.outputs.artifact }}
asset_content_type: application/x-gzip