Skip to content

test

test #7

Workflow file for this run

name: Update Release
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get latest release from tailscale
id: get_latest_release
uses: octokit/[email protected]
with:
route: GET /repos/tailscale/tailscale/releases/latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: "echo latest release: '${{ steps.get_latest_release.outputs.data }}'"
- run: "echo latest name : $(echo '${{ steps.get_latest_release.outputs.data }}' | jq -r '.name')"
- run: "echo Release could not be found. Request failed with status '${{ steps.get_release.outputs.status }}'"
if: ${{ failure() }}
- name: Update update.json
run: |
VERSION=$(echo '${{ steps.get_latest_release.outputs.data }}' | jq -r '.tag_name')
CHANGELOG=$(echo '${{ steps.get_latest_release.outputs.data }}' | jq -r '.html_url')
jq '.version = $VERSION | .changelog = $CHANGELOG' update.json > temp.json && mv temp.json update.json
- name: Commit and push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Update update.json"
git push origin dev