-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.46 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
name: Release build
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
run: sudo apt-get install -y mono-complete
- name: Install dependencies
run: nuget install -o packages
- name: Build executable
run: msbuild -p:Configuration=Release
- name: Set release version env var
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: NeoDoc-${{ env.RELEASE_VERSION }}
# A file, directory or wildcard pattern that describes what to upload
path: bin/Release/*
retention-days: 90
- name: Login to GitHub Registry
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: $GITHUB_ACTOR
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
# Build's context is the set of files located in the specified PATH or URL
context: .
# List of tags
tags: docker.pkg.github.com/ttt-2/neodoc/neodoc:${{ env.RELEASE_VERSION }}
# Always attempt to pull a newer version of the image
pull: true
load: true
- name: Push docker image
run: docker push docker.pkg.github.com/ttt-2/neodoc/neodoc:${{ env.RELEASE_VERSION }}