chore: bump version to 2.2.1 #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
tags: [ 'v*.*.*' ] | |
branches: [ 'testing' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Download Dalamud | |
run: | | |
mkdir dalamud | |
cd dalamud | |
wget https://github.com/goatcorp/dalamud-distrib/raw/main/latest.zip | |
unzip latest.zip | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: dotnet build --no-restore -c Release -p:IsCI=true | |
- name: Prepare for deploy | |
run: | | |
cp \ | |
bin/x64/Release/net8.0-windows/heliosphere-plugin/latest.zip \ | |
latest.zip | |
python3 -m pip install --user requests | |
if ./ci-tools.py is-testing; then | |
HS_TESTING_FLAG='--testing' | |
else | |
HS_TESTING_FLAG='--no-testing' | |
fi | |
python3 make_repo.py \ | |
$HS_TESTING_FLAG \ | |
--archive latest.zip \ | |
--changelog changelog.txt \ | |
--changelog-test changelog-testing.txt \ | |
--download-main https://repo.heliosphere.app/latest.zip \ | |
--download-test https://repo.heliosphere.app/testing.zip \ | |
repo.json | |
tar -I 'zstd -14' -cvf payload.tar.zst \ | |
repo.json \ | |
latest.zip | |
- name: Determine version | |
run: | | |
echo "HS_VERSION=$(./ci-tools.py get-version)" >> $GITHUB_ENV | |
- name: Publish Sentry release | |
uses: getsentry/action-release@v1 | |
continue-on-error: true | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: heliosphere | |
SENTRY_PROJECT: plugin | |
SENTRY_URL: https://sentry.heliosphere.app | |
with: | |
environment: production | |
set_commits: auto | |
version: ${{ env.HS_VERSION }} | |
version_prefix: 'plugin@' | |
- name: Deploy | |
env: | |
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | |
DEPLOY_IP: ${{ secrets.DEPLOY_IP }} | |
DEPLOY_SERVER_FINGERPRINT: ${{ secrets.DEPLOY_SERVER_FINGERPRINT }} | |
TUNNEL_SERVICE_TOKEN_ID: ${{ secrets.TUNNEL_SERVICE_TOKEN_ID }} | |
TUNNEL_SERVICE_TOKEN_SECRET: ${{ secrets.TUNNEL_SERVICE_TOKEN_SECRET }} | |
run: | | |
if ./ci-tools.py is-testing; then | |
DEPLOY_FLAG_TESTING="--testing" | |
else | |
DEPLOY_FLAG_TESTING="" | |
fi | |
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 | |
chmod +x cloudflared-linux-amd64 | |
sudo mv cloudflared-linux-amd64 /usr/local/bin/cloudflared | |
mkdir -p "$HOME/.ssh" | |
echo "$DEPLOY_KEY" > "$HOME/.ssh/id_ed25519" | |
echo "$DEPLOY_IP $DEPLOY_SERVER_FINGERPRINT" > "$HOME/.ssh/known_hosts" | |
echo -e "Host $DEPLOY_IP\n\tProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h" > $HOME/.ssh/config | |
chmod 0700 "$HOME/.ssh" | |
chmod 0600 "$HOME/.ssh/known_hosts" "$HOME/.ssh/config" "$HOME/.ssh/id_ed25519" | |
ssh heliosphere@"$DEPLOY_IP" deploy plugin $DEPLOY_FLAG_TESTING < payload.tar.zst |