Skip to content

add dist

add dist #14

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test on ${{ matrix.os }} / Node.js ${{ matrix.node-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
ubuntu-latest,
ubuntu-24.04,
windows-latest,
macos-latest,
macos-13
]
node-version: [16.x, 18.x, 20.x]
exclude:
# Ubuntu 24.04 is still in beta, only test with latest Node.js
- os: ubuntu-24.04
node-version: 16.x
- os: ubuntu-24.04
node-version: 18.x
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
test-action:
name: Test Action
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test action with exact version
uses: ./
with:
token: ${{ github.token }}
repos: |
- repo: gotray/got
version: v0.1.0
var_name: GOT_VERSION
- name: Test action with version range
uses: ./
with:
token: ${{ github.token }}
repos: |
- repo: gotray/got
version: ^0.1.0
var_name: GOT_VERSION_RANGE
- name: Verify outputs
run: |
echo "Exact version: ${{ env.GOT_VERSION }}"
echo "Range version: ${{ env.GOT_VERSION_RANGE }}"
if [[ "${{ env.GOT_VERSION }}" != "v0.1.0" ]]; then
echo "::error::Expected exact version v0.1.0, got ${{ env.GOT_VERSION }}"
exit 1
fi
if [[ "${{ env.GOT_VERSION_RANGE }}" != "v0.1.1" ]]; then
echo "::error::Expected range version v0.1.1, got ${{ env.GOT_VERSION_RANGE }}"
exit 1
fi