Skip to content

Commit

Permalink
Updated workflows again
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishamm committed Jun 21, 2023
1 parent c9831f8 commit cd901b6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ on:
options:
- dev
- unstable
- unstable-3.4
- unstable-3.5
- stable
- stable-3.4
- stable-3.5

jobs:
build:
Expand All @@ -21,20 +25,20 @@ jobs:
- uses: actions/checkout@v3

# Install NodeJS environment (TODO: Update to 16 when v3.5 is out)
- name: Set up NodeJs
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 14

# Install .NET environment
- name: Set up .NET 6
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6

# Install required tools
- name: Install dependencies
run: sudo apt install -y dpkg-sig
run: sudo apt install -y dpkg-sig libxml2-utils

# Import GPG key for package signing
- name: Configure GPG key
Expand All @@ -47,17 +51,27 @@ jobs:
- name: Build DSF packages
run: |
cd pkg
./build.sh --signing-key=C406404B2459FE0B1C6CC19D3738126EDA91C86B --target-arch=armhf --dest-dir=./armhf
./build.sh --signing-key=C406404B2459FE0B1C6CC19D3738126EDA91C86B --target-arch=arm64 --dest-dir=./arm64
./build.sh --signing-key=C406404B2459FE0B1C6CC19D3738126EDA91C86B --target-arch=armhf --dest-dir=./out
./build.sh --signing-key=C406404B2459FE0B1C6CC19D3738126EDA91C86B --target-arch=arm64 --dest-dir=./out
# Upload packages to pkg.duet3d.com
# Upload armhf packages to pkg.duet3d.com
- name: Upload package files
uses: Creepios/[email protected].3
uses: Creepios/[email protected].5
with:
host: pkg.duet3d.com
port: 22
username: ${{ secrets.PKG_SSH_USER }}
password: ${{ secrets.PKG_SSH_PASS }}
privateKey: ${{ secrets.PKG_SSH_KEY }}
localPath: ./pkg/armhf
remotePath: /tmp/${{ inputs.target }}
localPath: ./pkg/out
remotePath: /var/www/pkg/dists/${{ inputs.target }}/armv7

# Refresh package lists if the dev target is selected
- name: Refresh package lists
if: inputs.target == 'dev'
uses: appleboy/[email protected]
with:
host: pkg.duet3d.com
username: ${{ secrets.PKG_SSH_USER }}
key: ${{ secrets.PKG_SSH_KEY }}
script: update-pkg-feed dev
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
- name: Publish packages
run: |
# Publish to GitHub package registry
dotnet nuget push src/DuetAPI/bin/Debug/DuetAPI.*.nupkg --api-key $GH_API_KEY --source "https://nuget.pkg.github.com/Duet3D/index.json"
dotnet nuget push src/DuetAPIClient/bin/Debug/DuetAPIClient.*.nupkg --api-key $GH_API_KEY --source "https://nuget.pkg.github.com/Duet3D/index.json"
dotnet nuget push src/DuetHttpClient/bin/Debug/DuetHttpClient.*.nupkg --api-key $GH_API_KEY --source "https://nuget.pkg.github.com/Duet3D/index.json"
dotnet nuget push src/DuetAPI/bin/Debug/DuetAPI.*.nupkg --source "https://nuget.pkg.github.com/Duet3D/index.json" --api-key $GH_API_KEY
dotnet nuget push src/DuetAPIClient/bin/Debug/DuetAPIClient.*.nupkg --source "https://nuget.pkg.github.com/Duet3D/index.json" --api-key $GH_API_KEY
dotnet nuget push src/DuetHttpClient/bin/Debug/DuetHttpClient.*.nupkg --source "https://nuget.pkg.github.com/Duet3D/index.json" --api-key $GH_API_KEY
# Publish to NuGet package registry
dotnet nuget push src/DuetAPI/bin/Debug/DuetAPI.*.nupkg --api-key $NUGET_API_KEY --source "nuget.org"
dotnet nuget push src/DuetAPIClient/bin/Debug/DuetAPIClient.*.nupkg --api-key $NUGET_API_KEY --source "nuget.org"
dotnet nuget push src/DuetHttpClient/bin/Debug/DuetHttpClient.*.nupkg --api-key $NUGET_API_KEY --source "nuget.org"
env: |
GH_API_KEY: ${{ secrets.GITHUB_API_KEY }}
dotnet nuget push src/DuetAPI/bin/Debug/DuetAPI.*.nupkg --source "nuget.org" --api-key $NUGET_API_KEY
dotnet nuget push src/DuetAPIClient/bin/Debug/DuetAPIClient.*.nupkg --source "nuget.org" --api-key $NUGET_API_KEY
dotnet nuget push src/DuetHttpClient/bin/Debug/DuetHttpClient.*.nupkg --source "nuget.org" --api-key $NUGET_API_KEY
env:
GH_API_KEY: ${{ secrets.GH_API_KEY }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

0 comments on commit cd901b6

Please sign in to comment.