-
Notifications
You must be signed in to change notification settings - Fork 18
50 lines (47 loc) · 1.79 KB
/
publish-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
name: Publish (release)
on:
release:
types: [ published ]
jobs:
daemon:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build release
run: |
RELEASE=$(git describe --tags) bash .scripts/build_release_daemon.sh
- name: Publish to Docker Hub
run: |
docker login -u ${{ secrets.docker_user }} -p ${{ secrets.docker_key }}
# Publish as legacy name
docker tag ubclaunchpad/inertiad:$(git describe --tags) ubclaunchpad/inertia:$(git describe --tags)
docker push ubclaunchpad/inertia:$(git describe --tags)
- name: Publish to GitHub Container Registry
run: |
echo ${{ secrets.GH_PACKAGES_TOKEN }} | docker login ghcr.io --username $GITHUB_ACTOR --password-stdin
docker tag ubclaunchpad/inertiad:$(git describe --tags) ghcr.io/ubclaunchpad/inertiad:$(git describe --tags)
docker push ghcr.io/ubclaunchpad/inertiad:$(git describe --tags)
cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with: { go-version: '1.15' }
- name: Build release
run: |
RELEASE=$(git describe --tags) bash .scripts/build_release_cli.sh
- name: Publish to GitHub
uses: softprops/action-gh-release@v1
with:
files: dist/inertia.v*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Homebrew and Scoop
if: github.event.release.prerelease != true
env:
GIT_CREDENTIALS: 'ubclaunchpad-bot:${{ secrets.LP_GH_PUBLIC_REPO_TOKEN }}'
run: |
git config --global user.email 'team+bot@ubclaunchpad.com'
git config --global user.name 'ubclaunchpad-bot'
go run ./contrib/inertia-publish $(git describe --tags) --dryrun=false \
homebrew scoop \