Skip to content

Make the portable version of the update process independent. #1

Make the portable version of the update process independent.

Make the portable version of the update process independent. #1

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
name: Update Floorp-Portable version
on:
workflow_dispatch:
inputs:
display-version:
description: 'Display version of the update'
required: true
type: string
jobs:
update-latest-json:
runs-on: ubuntu-latest
steps:

Check failure on line 17 in .github/workflows/update-latest-json-portable.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-latest-json-portable.yml

Invalid workflow file

You have an error in your yaml syntax on line 17
- name: Details
run: |
echo "Display version: ${{ github.event.inputs.display-version }}"
- name: Checkout
uses: actions/checkout@v2
- name: Git config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: get current version
run: |
echo "Getting current version"
export CURRENT_VERSION=`cat ./browser-portable/latest.json | jq -r ".[].version" | head -1`
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
if [[ "$CURRENT_VERSION" == "null" ]]; then
false
fi
- name: Update latest.json
run: |
echo "Updating latest.json"
echo "new version: ${{ github.event.inputs.display-version }}"
echo "current version: ${{ env.CURRENT_VERSION }}"
sed -i 's/${{ env.CURRENT_VERSION }}/${{ github.event.inputs.display-version }}/g' ./browser-portable/latest.json
- name: Commit
run: |
git add .
git commit -m "Update Floorp Portable version"
git push
- name: Waiting 10 seconds...
run: |
sleep 10
- uses: ./.github/workflows/upload.yml