Skip to content

Commit

Permalink
Update autoupdate.json file from release pipeline (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
sachabruttin authored Nov 25, 2021
1 parent db38d72 commit 48c19d8
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit 48c19d8

Please sign in to comment.