Skip to content

Fix script text and typos #10

Fix script text and typos

Fix script text and typos #10

Workflow file for this run

name: Release
on: [push]
# push:
# # VERSION=$(date +%y%m).$(date +%d|sed s/^0//).$(date +%k%M|tr -d ' ')
# # git tag $VERSION -m $VERSION && git push --follow-tags
# tags:
# - '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
# fetch-depth: 0 is required for the change log to work correctly.
# For the details please see https://goreleaser.com/ci/actions/
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Deploy to public pairing service
shell: bash
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_KNOWN_HOST: ${{ secrets.SSH_KNOWN_HOST }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_PRIV_KEY: ${{ secrets.SSH_PRIV_KEY }}
SSH_USER: ${{ secrets.SSH_USER }}
run: |
pwd
ls -la
find . -name "rport-pairing_Linux_x86_64.tar.gz"
eval $(ssh-agent)
ssh-add - <<< "$SSH_PRIV_KEY"
mkdir -p /home/runner/.ssh
echo "$SSH_KNOWN_HOST">>~/.ssh/known_hosts
scp -P ${SSH_PORT} ./dist/rport-pairing_linux_x86_64.tar.gz ${SSH_USER}@${SSH_HOST}:/tmp
ssh -p ${SSH_PORT} -l ${SSH_USER} ${SSH_HOST} bash <<EOF
sudo tar -xzf /tmp/rport-pairing_linux_x86_64.tar.gz -C /usr/local/bin rport-pairing
sudo service rport-pairing restart
rm -f /tmp/rport-pairing_Linux_x86_64.tar.gz
EOF