Skip to content

Commit

Permalink
[PW-6181] Add workflow for nuget package (#733)
Browse files Browse the repository at this point in the history
* Add workflow for nuget package

* Changed workflow to custom dotnet packaging

* final changes

* Add workflow to create release notes

* cleaned up the yml

* Merge develop and remove release workflow

* remove random abstractOpenApiSchema file

* Update .github/workflows/publish.yml

---------

Co-authored-by: Alexandros Moraitis <alexandros.moraitis@adyen.com>
  • Loading branch information
jillingk and AlexandrosMor authored Mar 9, 2023
1 parent 6edb0cb commit 67316a5
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 16 deletions.
14 changes: 14 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
changelog:
categories:
- title: Breaking Changes 🛠
labels:
- Breaking change
- title: New Features 💎
labels:
- Feature
- title: Fixes ⛑️
labels:
- Fix
- title: Other Changes 🖇️
labels:
- "*"
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: publish to nuget
on:
push:
branches:
- main #push to main
jobs:
# publish the nuget package
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Sets up .NET
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
2.1.x
6.0.x
# Build Release and test
- name: Build Release
run: dotnet build Adyen
- name: Run test suite netcoreapp2.1
run: dotnet test --no-build -c Debug -f netcoreapp2.1 Adyen.Test/Adyen.Test.csproj
- name: Run test suite net6.0
run: dotnet test --no-build -c Debug -f net6.0 Adyen.Test/Adyen.Test.csproj
# Pack Release
- name: Pack
run: dotnet pack Adyen --no-build --configuration Release --output nuget
# Publish Package
- name: Publish Nuget
run: dotnet nuget push nuget/*.nupkg --api-key ${{ secrets.ADYEN_NUGET }} --source "nuget.org"
24 changes: 8 additions & 16 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
$script = <<-SCRIPT
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
echo "Run update"
sudo yum update
echo "Install dotnet core"
sudo yum -y install dotnet-sdk-2.2
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.box = "jeffnoxon/ubuntu-20.04-arm64"
config.vm.network "private_network", ip: "192.168.58.30"
config.vm.provider :parallels do |v|
v.memory = "4096"
v.cpus = 2
end
config.vm.synced_folder '.', '/home/vagrant/adyen-dotnet-api-library', disabled: false
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.network :forwarded_port, guest: 22, host: 3333
config.vm.provider :virtualbox do |vb|
vb.name = "adyen-dotnet-api-library"
vb.customize ["modifyvm", :id, "--memory", "1024", "--cpus", "2"]
end
config.vm.provision "shell", inline: $script
end
config.vm.network :forwarded_port, guest:9876, host: 9876
end

0 comments on commit 67316a5

Please sign in to comment.