From f63d177d7933ad1e78b8bf2ea844a343af7c201c Mon Sep 17 00:00:00 2001 From: Leandro Facchinetti Date: Sun, 14 Mar 2021 23:17:07 +0000 Subject: [PATCH] --- .github/workflows/main.yml | 53 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9827a96..7f2b3c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,18 +6,18 @@ jobs: os: [windows, macos, ubuntu] include: - os: windows - build: npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "CourseLore--windows--${{ github.sha }}.exe" - artifact: CourseLore--windows--${{ github.sha }}.exe + build: npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "Kill the Newsletter--windows--${{ github.sha }}.exe" + artifact: Kill the Newsletter--windows--${{ github.sha }}.exe - os: macos build: | - npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "CourseLore.app" - tar -czf "CourseLore--macos--${{ github.sha }}.app.tgz" "CourseLore.app" - artifact: CourseLore--macos--${{ github.sha }}.app.tgz + npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "Kill the Newsletter.app" + tar -czf "Kill the Newsletter--macos--${{ github.sha }}.app.tgz" "Kill the Newsletter.app" + artifact: Kill the Newsletter--macos--${{ github.sha }}.app.tgz - os: ubuntu build: | - npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "courselore" - tar -czf "courselore--linux--${{ github.sha }}.tgz" "courselore" - artifact: courselore--linux--${{ github.sha }}.tgz + npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "kill-the-newsletter" + tar -czf "kill-the-newsletter--linux--${{ github.sha }}.tgz" "kill-the-newsletter" + artifact: kill-the-newsletter--linux--${{ github.sha }}.tgz runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v2 @@ -55,9 +55,9 @@ jobs: - uses: actions/checkout@v2 - uses: actions/download-artifact@v2 with: - name: courselore--linux--${{ github.sha }}.tgz + name: kill-the-newsletter--linux--${{ github.sha }}.tgz - run: | - tar -xzf courselore--linux--${{ github.sha }}.tgz + tar -xzf kill-the-newsletter--linux--${{ github.sha }}.tgz cat >> ~/.ssh/known_hosts << "EOF" courselore.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWOjzHPP1v+6gEeRAVzEB7l/RH+mt31heowjiUVNjgTnpT1FDL/T4yqmztwPrzhXUdBAy7M16H+88Padxm+/rJ5qfbw2dH7KtOA4RALYy9ruBl6HFdCf59eh01A97Py/AmxlpXysGAVcdcVjLsr0PvfoEGOqMlohc0sBjCjhoFcqkP9P57Q4Q3gcqgwjNYaZ1BSbI2G6J6kihjN7+b8pFCHCw8fqs7xo+7pDUv/rvqfBTUAFV7sovwQU0bZK6Z8gWXYFGG0NpKVojsKOHCrZpM8pBBDmleisrJhXmnKQ+Lj/JvYuaEM6cHZh6+RH7ua6S9eqlL8EErXf7GZ4SPuTo1ghNJ5H9cR3k8Px4Op5bDIIdPP767jwGHabZJ5Z8l9QnQajq85gcE7E3vZ1yT2BDKQsIDJeNpg1etTgw6hSUlBQsKx8TNaI9nROSnKwKbSI+sGmZlwrx11XimEkvaMaFmSZfpN+ne/2kmjc81Pr0WKb82sIPf3X2KzmWeChkZus8= @@ -65,16 +65,15 @@ jobs: courselore.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBCGyIA9/oiJt/qrQNeNoIRNKA8CFc/ppPMnrtw2NW+7 EOF - ssh root@courselore.org "mkdir -p courselore" - rsync -a courselore root@courselore.org:courselore/courselore - rsync -a --delete customization-example/ root@courselore.org:courselore/customization/ - rsync -a deployment-example/configuration.js root@courselore.org:courselore/configuration.js - rsync -a deployment-example/courselore.service root@courselore.org:/etc/systemd/system/courselore.service + ssh root@kill-the-newsletter.com "mkdir -p kill-the-newsletter" + rsync -a kill-the-newsletter root@kill-the-newsletter.com:kill-the-newsletter/kill-the-newsletter + rsync -a deployment-example/configuration.js root@kill-the-newsletter.com:kill-the-newsletter/configuration.js + rsync -a deployment-example/kill-the-newsletter.service root@kill-the-newsletter.com:/etc/systemd/system/kill-the-newsletter.service - ssh root@courselore.org << "EOF" + ssh root@kill-the-newsletter.com << "EOF" systemctl daemon-reload - systemctl enable courselore - systemctl restart courselore + systemctl enable kill-the-newsletter + systemctl restart kill-the-newsletter EOF npm-publish: @@ -98,13 +97,13 @@ jobs: steps: - uses: actions/download-artifact@v2 with: - name: CourseLore--windows--${{ github.sha }}.exe + name: Kill the Newsletter--windows--${{ github.sha }}.exe - uses: actions/download-artifact@v2 with: - name: CourseLore--macos--${{ github.sha }}.app.tgz + name: Kill the Newsletter--macos--${{ github.sha }}.app.tgz - uses: actions/download-artifact@v2 with: - name: courselore--linux--${{ github.sha }}.tgz + name: kill-the-newsletter--linux--${{ github.sha }}.tgz - run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" id: tag - uses: actions/create-release@v1 @@ -119,22 +118,22 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: CourseLore--windows--${{ github.sha }}.exe - asset_name: CourseLore--windows--${{ steps.tag.outputs.tag }}.exe + asset_path: Kill the Newsletter--windows--${{ github.sha }}.exe + asset_name: Kill the Newsletter--windows--${{ steps.tag.outputs.tag }}.exe asset_content_type: application/vnd.microsoft.portable-executable - uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: CourseLore--macos--${{ github.sha }}.app.tgz - asset_name: CourseLore--macos--${{ steps.tag.outputs.tag }}.app.tgz + asset_path: Kill the Newsletter--macos--${{ github.sha }}.app.tgz + asset_name: Kill the Newsletter--macos--${{ steps.tag.outputs.tag }}.app.tgz asset_content_type: application/gzip - uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: courselore--linux--${{ github.sha }}.tgz - asset_name: courselore--linux--${{ steps.tag.outputs.tag }}.tgz + asset_path: kill-the-newsletter--linux--${{ github.sha }}.tgz + asset_name: kill-the-newsletter--linux--${{ steps.tag.outputs.tag }}.tgz asset_content_type: application/gzip