-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 1.36 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
name: Release
on:
push:
branches:
- release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-and-release:
name: Build and Release
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: [1.6.0-rc1]
julia-arch: [x86]
os: [ubuntu-latest]
steps:
- name: Checkout current branch
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup Julia
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Setup environment variables
run: |
VERSION=`cat Project.toml | grep "version" | cut -d '=' -f2 | tr -d ' ' | tr -d '"' | tr -d \'`
echo "VERSION=${VERSION}" >> $GITHUB_ENV
IS_SNAPSHOT=`if [[ "${VERSION}" == 0.* ]] ; then echo "true" ; else echo "false" ; fi`
echo "IS_SNAPSHOT=${IS_SNAPSHOT}" >> $GITHUB_ENV
- name: Compress target directories
run: |
zip -r Psychometrics.zip src/ test/ LICENSE *.toml
- name: Upload Github Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ env.GITHUB_TOKEN }}
automatic_release_tag: v${{ env.VERSION }}
prerelease: ${{ env.IS_SNAPSHOT }}
title: v${{ env.VERSION }}
files: |
Psychometrics.zip