Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the OctopusDeploy actions to v3 #56

Merged
merged 17 commits into from Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -53,7 +53,7 @@ jobs:
echo "Outputting all files in the packaging directory:"
$contents = Get-ChildItem -Recurse -Path packaging | Select-Object -Property FullName
echo $contents | Out-String -Width 1000
if (($contents | Measure-Object).Count -ne 6) {
if (($contents | Measure-Object).Count -ne 7) {
tamararivera marked this conversation as resolved.
Show resolved Hide resolved
throw "Unexpected number of files in packaging directory"
}

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
echo "Outputting all files in the packaging directory:"
$contents = Get-ChildItem -Recurse -Path packaging | Select-Object -Property FullName
echo $contents | Out-String -Width 1000
if (($contents | Measure-Object).Count -ne 9) {
if (($contents | Measure-Object).Count -ne 10) {
tamararivera marked this conversation as resolved.
Show resolved Hide resolved
throw "Unexpected number of files in packaging directory"
}

Expand Down
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -20,7 +20,7 @@ Before this action runs:
```yaml
steps:
- name: Deploy
uses: Particular/push-octopus-package-action@v1.0.0
uses: Particular/push-octopus-package-action@v2.0.0
with:
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}
```
Expand All @@ -32,7 +32,7 @@ This is used primarily for [ServiceControl](https://github.com/Particular/Servic
```yaml
steps:
- name: Deploy
uses: Particular/push-octopus-package-action@v1.0.0
uses: Particular/push-octopus-package-action@v2.0.0
with:
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}
additional-metadata-paths: metadata/*.json
Expand All @@ -42,7 +42,7 @@ This is used primarily for [ServiceControl](https://github.com/Particular/Servic
```yaml
steps:
- name: Deploy
uses: Particular/push-octopus-package-action@v1.0.0
uses: Particular/push-octopus-package-action@v2.0.0
with:
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}
additional-metadata-paths: |
Expand All @@ -54,7 +54,6 @@ This is used primarily for [ServiceControl](https://github.com/Particular/Servic

This action abstracts the following steps:

1. Installing the Octopus CLI
1. Arranging NuGet packages and other assets on disk for packaging
1. Creating a metadata file to pass version information to Octopus Deploy
1. Packaging the content into a RepoName.Deploy package
Expand Down
33 changes: 20 additions & 13 deletions action.yml
Expand Up @@ -37,11 +37,7 @@ runs:
if: runner.os == 'Windows'
run: Get-ChildItem -Recurse -File deploy -Filter *.cat -ErrorAction:Ignore | foreach {& "$($Env:SIGNTOOL)" verify /pa $_.FullName}
shell: pwsh
- name: Install Octopus CLI
uses: OctopusDeploy/install-octopus-cli-action@v1.2.1
with:
version: latest
- name: Create Octopus Package
- name: Create the files
env:
ADDITIONAL_METADATA_PATHS: ${{ inputs.additional-metadata-paths }}
run: |
Expand Down Expand Up @@ -99,28 +95,39 @@ runs:
Copy-Item $_ packaging
}
}

# Create the Octopus package
octo pack --id="$($RepoName).Deploy" --version="${{env.MinVerVersion}}" --format="nupkg" --basePath="packaging" --outFolder="octopus-package"
shell: pwsh
- name: Create a NuGet package
tamararivera marked this conversation as resolved.
Show resolved Hide resolved
id: package
uses: OctopusDeploy/create-nuget-package-action@v3.1.1
with:
package_id: ${{env.PARTICULAR_REPO_NAME}}
version: ${{env.MinVerVersion}}
output_folder: octopus-package
base_path: packaging
files: |
**/*.*
nuspec_description: This is a real description
tamararivera marked this conversation as resolved.
Show resolved Hide resolved
nuspec_authors: Particular software
tamararivera marked this conversation as resolved.
Show resolved Hide resolved
- name: Publish Octopus Package Artifacts
uses: actions/upload-artifact@v3.1.3
tamararivera marked this conversation as resolved.
Show resolved Hide resolved
with:
name: octopus-package
path: octopus-package/*
name: ${{steps.package.outputs.package_filename}}
path: ${{steps.package.outputs.package_file_path}}
retention-days: 1
- name: Push package to Octopus Deploy
uses: OctopusDeploy/push-package-action@v2.2.0
uses: OctopusDeploy/push-package-action@v3.2.1
with:
server: https://deploy.particular.net
api_key: ${{ inputs.octopus-deploy-api-key }}
packages: octopus-package/${{env.PARTICULAR_REPO_NAME}}.Deploy.${{env.MinVerVersion}}.nupkg
packages: ${{steps.package.outputs.package_file_path}}
space: "Default"
- name: Create Octopus Deploy release
uses: OctopusDeploy/create-release-action@v2.1.0
uses: OctopusDeploy/create-release-action@v3.2.1
with:
server: https://deploy.particular.net
api_key: ${{ inputs.octopus-deploy-api-key }}
project: ${{env.PARTICULAR_REPO_NAME}}
release_number: ${{env.MinVerVersion}}
package_version: ${{env.MinVerVersion}}
packages: "GitReleaseManager:0.11.0"
space: "Default"