forked from restic/restic
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (54 loc) · 1.68 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:
tags:
- "*.*"
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Export Environment Variables
run: |
echo "WORKING_DIR=$(pwd)" >> $GITHUB_ENV
- name: Build Release Binaries
run: |
# build binaries
make build
- name: Publish image into GitHub Container Registry
env:
REGISTRY: ghcr.io/stashed
USERNAME: 1gtm
DOCKER_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
# login into the registry
docker login ghcr.io --username ${USERNAME} --password ${DOCKER_TOKEN}
# build and push the docker image
make push
- name: Publish image into DockerHub
env:
REGISTRY: stashed
USERNAME: 1gtm
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
# login into the registry
docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
# build and push the docker image
make push
- name: Build Changelog
id: changelog-builder
uses: mikepenz/[email protected]
with:
configuration: .github/changelog-config.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
fail_on_unmatched_files: true
body: ${{steps.changelog-builder.outputs.changelog}}
files: ${{env.WORKING_DIR}}/.go/bin/restic_*