Skip to content

Commit

Permalink
Fix CI: remove suffix for default branch and fix deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstarkov committed Oct 11, 2024
1 parent d440d0c commit 51d37d5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Prepare version
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const script = require(require('path').resolve('./.github/workflows/version.js'))
const vs = script({ context, github, firstRev: 'cfefc91c' });
const majmin = '1.1';
let ver_str = vs.formatVersion(`${majmin}.$(GitRevCount)-$(GitBranch) [$(GitSha6)/$(yyyy)-$(mm)-$(dd)]`);
let ver_suf = vs.formatVersion('$(GitBranch)');
if (ver_suf == 'main') {
ver_str = ver_str.replace('-main', '');
if (ver_suf == 'master') {
ver_str = ver_str.replace('-master', '');
ver_suf = '';
}
core.exportVariable('VER_STR', ver_str);
core.exportVariable('VER_NUM', vs.formatVersion(`${majmin}.$(GitRevCount)`));
core.exportVariable('VER_SUF', ver_suf);
- name: Install dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-quality: 'ga'
Expand All @@ -50,7 +50,7 @@ jobs:
run: dotnet nuget push Publish/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: RT.Servers-v${{env.VER_NUM}}
path: Publish
Expand Down

0 comments on commit 51d37d5

Please sign in to comment.