-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update autoupdate.json file from release pipeline (#66)
- Loading branch information
1 parent
db38d72
commit 48c19d8
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,22 @@ jobs: | |
files: | | ||
*.zip | ||
# Chocolatey | ||
chocolatey: | ||
runs-on: windows-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: olegtarasov/[email protected] | ||
id: tag | ||
with: | ||
tagRegex: (?<version>\d.\d.\d)(?:-)(?<beta>.*) # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined. | ||
|
||
- name: 'Replace tokens Chocolatey files #1' | ||
uses: datamonsters/replace-action@v2 | ||
with: | ||
|
@@ -89,3 +105,34 @@ jobs: | |
with: | ||
path: ./src/CosmosDbExplorer/Chocolatey-Packages/cosmosdbexplorer/cosmosdbexplorer.${{ steps.tag.outputs.version }}.nupkg | ||
|
||
# Autoupdater | ||
autoupdater: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Checkout gh-pages | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
fetch-depth: 0 | ||
|
||
- uses: olegtarasov/[email protected] | ||
id: tag | ||
with: | ||
tagRegex: (?<version>\d.\d.\d)(?:-)(?<beta>.*) # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined. | ||
|
||
- name: Create autoupdate.json file | ||
id: create-autoupdate-json | ||
uses: jsdaniell/[email protected] | ||
with: | ||
name: autoupdate.json | ||
json: '{"version":"${{ steps.tag.outputs.version }}","url":"https://github.com/sachabruttin/CosmosDbExplorer/releases/download/$GIT_TAG_NAME/CosmosDbExplorer.zip","mandatory":false,"checksum":null,"changelog":null}' | ||
|
||
- run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git commit -m "updated autoupdate.json to version $GIT_TAG_NAME" | ||
git push | ||