Fix first-time fetching (sorry! :c) #105
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
name: Build Azalea and Release | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build codebase and release | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get version | |
id: version | |
run: | | |
version=$(cat ./extension/manifest.json | grep -oE '[ ]+"version": "(.*)",' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') | |
echo "value=$version" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
id: dependencies | |
run: | | |
npm i -g pnpm | |
pnpm i | |
- name: Build codebase | |
id: build | |
run: pnpm build | |
- name: Compress `dist` directory | |
id: compress | |
run: | | |
mv dist/bundle.js . | |
mv dist Azalea-${{ steps.version.outputs.value }} | |
zip -r Azalea.zip Azalea-${{ steps.version.outputs.value }} & wait $!; | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
tag_name: "${{ steps.version.outputs.value }}" | |
name: "Azalea ${{ steps.version.outputs.value }}" | |
files: | | |
./*.zip | |
bundle.js |