Skip to content

Commit

Permalink
build: update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Jul 30, 2020
1 parent 3f7933f commit c65568c
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 80 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/package_release.yml
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- master
- alpha
- beta

jobs:
build:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2

- name: Cache Nuget
uses: actions/cache@v2
with:
path: |
~/.nuget/packages
${{ github.workspace }}/roslyn/artifacts/obj
key: ${{ runner.os }}-nuget-and-artifacts-${{ hashFiles('**/eng/Versions.props') }}
restore-keys: ${{ runner.os }}-nuget-and-artifacts-

- name: Cache Node
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-

- run: npm ci && npx semantic-release
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
16 changes: 0 additions & 16 deletions .github/workflows/push_package.sh

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/release.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
25 changes: 0 additions & 25 deletions .github/workflows/update_roslyn.sh

This file was deleted.

11 changes: 7 additions & 4 deletions package.json
Expand Up @@ -6,7 +6,9 @@
"package:format": "npx format-package -w",
"package:update": "npx ncu -u && npm install && npm audit fix",
"release": "npm ci && npx semantic-release",
"release:debug": "npm run release -- --dry-run --no-ci --debug"
"release:debug": "npm run release -- --dry-run --no-ci --debug",
"build:pack": "./tool.sh --pack",
"build:test": "./tool.sh --run-tests"
},
"release": {
"plugins": [
Expand All @@ -16,8 +18,9 @@
[
"@semantic-release/exec",
{
"prepareCmd": "roslyn/build.sh --pack -r -c Release /p:PackageVersion=${nextRelease.version} /p:SemanticVersioningV1=false",
"publishCmd": ".github/workflows/push_package.sh ${nextRelease.version}"
"verifyConditionsCmd": "test -n \"$NUGET_TOKEN\"",
"prepareCmd": "./tool.sh --pack --run-tests --version ${nextRelease.version}",
"publishCmd": "./tool.sh --publish --version ${nextRelease.version} --token \"$NUGET_TOKEN\""
}
]
]
Expand All @@ -26,4 +29,4 @@
"@semantic-release/exec": "^5.0.0",
"semantic-release": "^17.1.1"
}
}
}

0 comments on commit c65568c

Please sign in to comment.