feat: add input for bun-version-file

This commit is contained in:
Ade Hery Shopyan 2024-04-04 17:19:34 +07:00 committed by GitHub
parent 8f24390df0
commit f83767c0cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 116 additions and 16 deletions

View file

@ -85,6 +85,7 @@ jobs:
echo "Expected version to be 1.1.0, got ${{ steps.bun.outputs.version }}"
exit 1
fi
setup-bun-from-tool-versions:
runs-on: ${{ matrix.os }}
strategy:
@ -99,10 +100,51 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup package.json
- name: Setup .tool-versions
shell: bash
run: |
echo "bun ${{ matrix.content }}" > .tool-versions
echo "${{ matrix.content }}" > .tool-versions
- name: Setup Bun
uses: ./
- name: Run Bun
id: bun
shell: bash
run: |
bun --version
echo "version=$(bun --version)" >> $GITHUB_OUTPUT
- name: Check version
shell: bash
run: |
if [[ "${{ steps.bun.outputs.version }}" == "1.1.0" ]]; then
echo "Version is 1.1.0"
else
echo "Expected version to be 1.1.0, got ${{ steps.bun.outputs.version }}"
exit 1
fi
setup-bun-from-bumrc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
content:
- "1.1.0"
- "latest"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .bumrc
shell: bash
run: |
echo "${{ matrix.content }}" > .bumrc
- name: Setup Bun
uses: ./