Skip to content

Commit

Permalink
Changed the SCP action to one that can have commands executed before …
Browse files Browse the repository at this point in the history
…and after the upload
  • Loading branch information
walkero-gr committed Jan 15, 2024
1 parent 3155d38 commit e61921f
Showing 1 changed file with 31 additions and 28 deletions.
59 changes: 31 additions & 28 deletions .github/workflows/makeRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
mv clib4.lha clib4-${{ github.event.release.tag_name }}.lha
- name: Create the DEB release archive
run: |
make -f GNUmakefile.os4 dpkg DPKG_LIB=clib4_${{ github.event.release.tag_name }}_amd64
make -f GNUmakefile.os4 dpkg DPKG_LIB=clib4-${{ github.event.release.tag_name }}_amd64
- name: Upload LHA release file in GitHub
uses: actions/upload-release-asset@v1
env:
Expand All @@ -43,32 +43,35 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /opt/code/clib4_${{ github.event.release.tag_name }}_amd64.deb
asset_name: clib4_${{ github.event.release.tag_name }}_amd64.deb
asset_path: /opt/code/clib4-${{ github.event.release.tag_name }}_amd64.deb
asset_name: clib4-${{ github.event.release.tag_name }}_amd64.deb
asset_content_type: application/vnd.debian.binary-pac
- name: Upload DEB file to the server
uses: appleboy/scp-action@v0.1.7
- 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: clib4-${{ github.event.release.tag_name }}_amd64.deb
scp_target: /opt/amigarepo/ubuntu/pool/main
before_script: |
rm /opt/amigarepo/ubuntu/pool/main/clib4-*.deb
after_script: |
/root/regenerate-packages.sh
- name: Prepare OS4Depot release
run: |
mkdir os4depot-release
cp clib4-${{ github.event.release.tag_name }}.lha ./os4depot-release/clib4.lha
cp ./os4depot.readme ./os4depot-release/clib4_lha.readme
sed -i "s/VERSION_TAG/${{ github.event.release.tag_name }}/" ./os4depot-release/os4depot.readme
sed -i "s/OS4DEPOT_PASSPHRASE/${{ secrets.OS4DEPOT_PASSPHRASE }}/" ./os4depot-release/os4depot.readme
- name: Release on OS4Depot
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
host: ${{ secrets.DEBSERVER_HOST }}
username: ${{ secrets.DEBSERVER_USERNAME }}
port: ${{ secrets.DEBSERVER_PORT }}
key: ${{ secrets.DEBSERVER_PRIVATE_KEY }}
source: "clib4_${{ github.event.release.tag_name }}_amd64.deb"
target: /opt/
# - name: Prepare OS4Depot release
# run: |
# mkdir os4depot-release
# cp clib4-${{ github.event.release.tag_name }}.lha ./os4depot-release/clib4.lha
# cp ./os4depot.readme ./os4depot-release/clib4_lha.readme
# sed -i "s/VERSION_TAG/${{ github.event.release.tag_name }}/" ./os4depot-release/os4depot.readme
# sed -i "s/OS4DEPOT_PASSPHRASE/${{ secrets.OS4DEPOT_PASSPHRASE }}/" ./os4depot-release/os4depot.readme
# - name: Release on OS4Depot
# uses: SamKirkland/FTP-Deploy-Action@v4.3.4
# with:
# server: os4depot.net
# port: 21
# username: ftp
# password:
# server-dir: ./upload
# local-dir: /opt/code/os4depot-release/
# - name: Release on Ubuntu apt server
server: os4depot.net
port: 21
username: ftp
password:
server-dir: ./upload
local-dir: /opt/code/os4depot-release/

0 comments on commit e61921f

Please sign in to comment.