Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/actions/scp-deb-server/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: SCP DEB server
description: "scp archives to the DEB server"

runs:
using: "composite"
steps:
- name: Install SSH client
run: sudo apt-get update && sudo apt-get install -y openssh-client

- name: Setup SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEBSERVER_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p ${{ secrets.DEBSERVER_PORT }} -H ${{ secrets.DEBSERVER_HOST }} >> ~/.ssh/known_hosts

- name: Before script
run: |
echo "Remove old release"

- name: Upload via SCP
run: |
scp -i ~/.ssh/id_rsa \
-P ${{ secrets.DEBSERVER_PORT }} \
-o StrictHostKeyChecking=no \
"/opt/code/${{ env.archive_name }}_amd64.deb" \
${{ secrets.DEBSERVER_USERNAME }}@${{ secrets.DEBSERVER_HOST }}:/opt/amigarepo/ubuntu/pool/main

- name: After script
run: |
echo "Regenerate the packages"
ssh -i ~/.ssh/id_rsa \
-p ${{ secrets.DEBSERVER_PORT }} \
-o StrictHostKeyChecking=no \
${{ secrets.DEBSERVER_USERNAME }}@${{ secrets.DEBSERVER_HOST }} \
"sh /root/regenerate-packages.sh"

- name: Cleanup
if: always()
run: |
rm -f ~/.ssh/id_rsa
13 changes: 1 addition & 12 deletions .github/workflows/_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,7 @@ jobs:
asset_content_type: application/vnd.debian.binary-pac

- name: Upload DEB release file to the server
uses: kostya-ten/ssh-server-deploy@v4
with:
host: ${{ secrets.DEBSERVER_HOST }}
port: ${{ secrets.DEBSERVER_PORT }}
username: ${{ secrets.DEBSERVER_USERNAME }}
private_key: ${{ secrets.DEBSERVER_PRIVATE_KEY }}
scp_source: /opt/code/${{ env.archive_name }}_amd64.deb
scp_target: /opt/amigarepo/ubuntu/pool/main
before_script: |
rm /opt/amigarepo/ubuntu/pool/main/clib4-*_amd64.deb
after_script: |
/root/regenerate-packages.sh
uses: ./.github/actions/scp-deb-server

- name: Create Pull Request
if: ${{ inputs.spe == 'no' }}
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/makeRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Make a new release
on:
release:
branches:
- master
- scp-actions
types:
- published

Expand All @@ -16,22 +16,22 @@ jobs:
gcc: 11
spe: "no"

compile-spe:
name: Build for PowerPC SPE cpus
uses: ./.github/workflows/_compile.yml
with:
git_tag: ${{ github.event.release.tag_name }}
gcc: 6
spe: "yes"
# compile-spe:
# name: Build for PowerPC SPE cpus
# uses: ./.github/workflows/_compile.yml
# with:
# git_tag: ${{ github.event.release.tag_name }}
# gcc: 6
# spe: "yes"

announcements:
needs: [compile-ppc, compile-spe]
name: Notify on Discord on successful release
runs-on: ubuntu-latest
steps:
- name: Notify on Discord on successful release
uses: hunghg255/action-notifications@master
with:
discord_webhook: https://discord.com/api/webhooks/${{ secrets.DISCORD_ANNOUNCEMENTS_ID }}/${{ secrets.DISCORD_ANNOUNCEMENTS_TOKEN }}
title: "clib4 ${{ github.event.release.tag_name }} released"
description: "Check it out at: ${{ github.event.release.html_url }}"
# announcements:
# needs: [compile-ppc, compile-spe]
# name: Notify on Discord on successful release
# runs-on: ubuntu-latest
# steps:
# - name: Notify on Discord on successful release
# uses: hunghg255/action-notifications@master
# with:
# discord_webhook: https://discord.com/api/webhooks/${{ secrets.DISCORD_ANNOUNCEMENTS_ID }}/${{ secrets.DISCORD_ANNOUNCEMENTS_TOKEN }}
# title: "clib4 ${{ github.event.release.tag_name }} released"
# description: "Check it out at: ${{ github.event.release.html_url }}"
Loading