outline-server/.github/workflows/manager_linux_publish_release.yml
Daniel LaCosse 144c533f14
feat(release): Linux Manager (#1056)
* start release process for linux

* re-org

* add get_version

* fix for file name conventions

* break out func, revert file

* fix get_version.mjs

* equals

* update readme
2022-03-10 10:23:56 -05:00

79 lines
2.7 KiB
YAML

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