Skip to content

Commit

Permalink
Update Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Aug 14, 2024
1 parent 03b7db3 commit cca985f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/deploy-pages-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,21 @@ jobs:
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Set Version

- name: Install yq
run: sudo apt-get install -y jq python3-pip && pip3 install yq

- name: Extract version from base.yaml
id: extract_version
run: |
version=$(grep 'version:' firmware/base.yaml | awk -F'"' '{print $2}')
version="$version-dev"
sed -i -e "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" package.json
VERSION=$(yq e '.esphome.project.version' firmware/base.yaml)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Update package.json version
run: |
jq --arg version "$VERSION" '.version = $version' package.json > temp.json
mv temp.json package.json
- name: Install dependencies
run: npm ci
- name: Build with VitePress
Expand Down

0 comments on commit cca985f

Please sign in to comment.