forked from Jigsaw-Code/outline-server
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.69 KB
/
manager_linux_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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Publish Manager Linux Release Candidate
on:
workflow_dispatch:
inputs:
commit_sha:
description: "SHA of commit to publish (example: 2ac8bd4a915a7c8a3e3a63081d72da33baa9ea7e)"
required: true
jobs:
publish-release:
name: Publish Client Linux Release Candidate
runs-on: ubuntu-latest
timeout-minutes: 15
environment: Releases Repository
env:
RELEASES_REPOSITORY: ${{ secrets.RELEASES_REPOSITORY }}
RELEASES_DEPLOY_KEY: ${{ secrets.RELEASES_DEPLOY_KEY }}
RELEASE_COMMIT_SHA: ${{ github.event.inputs.commit_sha }}
# STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Install Node
uses: actions/setup-node@v2.2.0
with:
node-version: 16
- name: Install NPM Dependencies
run: npm ci
- name: Download Release Candidate
uses: dawidd6/action-download-artifact@575b1e4167df67acf7e692af784566618b23c71e
with:
workflow: build_release_candidates.yml
commit: ${{ env.RELEASE_COMMIT_SHA }}
name: manager_linux_release_${{ env.RELEASE_COMMIT_SHA }}
path: manager_linux_release
- name: Checkout Releases Repository
uses: actions/checkout@v2.3.4
with:
repository: ${{ env.RELEASES_REPOSITORY }}
ssh-key: ${{ env.RELEASES_DEPLOY_KEY }}
path: outline-releases
- name: Push Tags and Release Commits
run: |
git config --global user.name "OutlineBot"
git config --global user.email "outlinebot@users.noreply.github.com"
RELEASE_VERSION="$(node scripts/get_version.mjs linux)"
RELEASE_TAG="linux-${RELEASE_VERSION}"
[ "$(git tag -l "$RELEASE_TAG")" != "" ] && exit 1
cp manager_linux_release/Outline-Manager.AppImage outline-releases/manager/stable/Outline-Manager.AppImage
cp manager_linux_release/latest-linux.yml outline-releases/manager/stable/latest-linux.yml
cd outline-releases
git checkout master
git add manager/stable/Outline-Manager.AppImage manager/stable/latest-linux.yml
git commit -m "Release linux manager v${RELEASE_VERSION}"
git push origin master
git tag "$RELEASE_TAG"
git push origin "$RELEASE_TAG"
cd ..
git tag "$RELEASE_TAG"
git push origin "$RELEASE_TAG"
# TODO(daniellacosse): S3 bucket?
# TODO(daniellacosse): snap store
# - name: Publish to Snap store
# uses: snapcore/action-publish@v1
# with:
# store_login: ${{ secrets.STORE_LOGIN }}
# snap: build/dist/Outline-Manager.AppImage
# release: edge