Skip to content

Commit 9e3e4f7

Browse files
GitHub actions updates (#162)
* Bump RabbitMQ and Erlang versions on Windows * Move CI specific files to `.ci/` * Only publish to NuGet when a GitHub release or pre-release is published Bump actions resource versions Update release process documentation Co-authored-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
1 parent 2b5177b commit 9e3e4f7

File tree

7 files changed

+23
-27
lines changed

7 files changed

+23
-27
lines changed

tools/install.ps1 renamed to .ci/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Set-StrictMode -Version 2.0
44

55
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 'Tls12'
66

7-
$versions_path = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'tools' | Join-Path -ChildPath 'versions.json'
7+
$versions_path = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath '.ci' | Join-Path -ChildPath 'versions.json'
88
$versions = Get-Content $versions_path | ConvertFrom-Json
99
Write-Host "[INFO] versions: $versions"
1010
$erlang_ver = $versions.erlang

.ci/versions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"erlang": "25.0.4",
3+
"rabbitmq": "3.10.7"
4+
}

.github/workflows/build-test.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ jobs:
88
name: build/test on windows-latest
99
runs-on: windows-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-dotnet@v1
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-dotnet@v2
1313
with:
1414
dotnet-version: 6.0.x
15-
- uses: actions/cache@v2
15+
- uses: actions/cache@v3
1616
with:
1717
# Note: the cache path is relative to the workspace directory
1818
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
1919
path: ~/installers
20-
key: ${{ runner.os }}-v1-${{ hashFiles('tools/versions.json') }}
21-
- uses: actions/cache@v2
20+
key: ${{ runner.os }}-v1-${{ hashFiles('.ci/versions.json') }}
21+
- uses: actions/cache@v3
2222
with:
2323
path: |
2424
~/.nuget/packages
@@ -27,7 +27,7 @@ jobs:
2727
restore-keys: |
2828
${{ runner.os }}-v2-nuget-
2929
- name: Install and start RabbitMQ
30-
run: ./tools/install.ps1
30+
run: ./.ci/install.ps1
3131
- name: Restore
3232
run: dotnet restore --verbosity=normal
3333
- name: Build
@@ -51,11 +51,11 @@ jobs:
5151
- 1883:1883
5252
- 61613:61613
5353
steps:
54-
- uses: actions/checkout@v2
55-
- uses: actions/setup-dotnet@v1
54+
- uses: actions/checkout@v3
55+
- uses: actions/setup-dotnet@v2
5656
with:
5757
dotnet-version: 6.0.x
58-
- uses: actions/cache@v2
58+
- uses: actions/cache@v3
5959
with:
6060
path: |
6161
~/.nuget/packages

.github/workflows/publish-nuget.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
publish-nuget:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-dotnet@v1
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-dotnet@v2
1515
with:
1616
dotnet-version: 6.0.x
17-
- uses: actions/cache@v2
17+
- uses: actions/cache@v3
1818
with:
1919
path: |
2020
~/.nuget/packages

.github/workflows/publish.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
name: publish rabbitmq-stream-dotnet-client
22

33
on:
4-
create:
5-
branches-ignore:
6-
- '*'
7-
tags:
8-
- '*'
9-
push:
10-
tags:
11-
- '*'
4+
release:
5+
types:
6+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
7+
- published
128

139
jobs:
1410
call-build-test:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,10 @@ The client is work in progress. The API(s) could change prior to version `1.0.0`
616616
* Ensure builds are green: [link](https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/actions)
617617
* Tag the `main` branch using your GPG key:
618618
```
619-
git tag -a -s -u GPG_KEY_ID -m 'rabbitmq-stream-dotnet-client v1.0.0-beta.6' 'v1.0.0-beta.6' && git push && git push --tags
619+
git tag -a -s -u GPG_KEY_ID -m 'rabbitmq-stream-dotnet-client v1.0.0' 'v1.0.0' && git push && git push --tags
620620
```
621621
* Ensure the build for the tag passes: [link](https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/actions)
622+
* Create the new release on GitHub, which triggers a build and publish to NuGet: [link](https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/releases)
622623
* Check for the new version on NuGet: [link](https://www.nuget.org/packages/RabbitMQ.Stream.Client)
623624
* Best practice is to download the new package and inspect the contents using [NuGetPackageExplorer](https://github.com/NuGetPackageExplorer/NuGetPackageExplorer)
624-
* Create the new release on GitHub: [link](https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/releases)
625625
* Announce the new release on the mailing list: [link](https://groups.google.com/g/rabbitmq-users)

tools/versions.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)