Merge pull request #164 from walkero-gr/disable-os4depot-release #3
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: Make a new release | ||
on: | ||
release: | ||
branches: | ||
- master | ||
types: | ||
- published | ||
jobs: | ||
run: | ||
name: Build latest code | ||
runs-on: ubuntu-latest | ||
container: | ||
image: walkero/amigagccondocker:os4-gcc11-exp | ||
volumes: | ||
- '${{ github.workspace }}:/opt/code' | ||
steps: | ||
- name: Pull code | ||
uses: actions/checkout@v4 | ||
- name: Compile clib4 | ||
run: | | ||
cd /opt/code && \ | ||
make -j1 -f GNUmakefile.os4 OS=os4 SHARED=no | ||
- name: Create the LHA release archive | ||
run: | | ||
make -f GNUmakefile.os4 release && \ | ||
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 | ||
- name: Upload LHA release file in GitHub | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: /opt/code/clib4-${{ github.event.release.tag_name }}.lha | ||
asset_name: clib4-${{ github.event.release.tag_name }}.lha | ||
asset_content_type: application/x-lzh-compressed | ||
- name: Upload DEB release file in GitHub | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
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_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: 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/[email protected] | ||
# with: | ||
# server: os4depot.net | ||
# port: 21 | ||
# username: ftp | ||
# password: | ||
# server-dir: ./upload | ||
# local-dir: /opt/code/os4depot-release/ |