Release: New version (next) (#29) #96
This file contains hidden or 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
| on: | |
| - push | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # ratchet:actions/checkout@v6 | |
| - name: Setup Mise | |
| uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # ratchet:jdx/mise-action@v3 | |
| with: | |
| cache: false | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run type checking | |
| run: npm run typecheck | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| - name: Build action | |
| run: npm run build | |
| - name: Check dist is up to date | |
| run: | | |
| if [ -n "$(git status --porcelain dist)" ]; then | |
| echo "ERROR: dist directory is not up to date. Please run 'npm run build' and commit the changes." | |
| git status --porcelain dist | |
| exit 1 | |
| fi | |
| test-action: | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # ratchet:actions/checkout@v6 | |
| - name: Setup Mise | |
| uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # ratchet:jdx/mise-action@v3 | |
| with: | |
| cache: false | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build action | |
| run: npm run build | |
| - name: Test action (latest version) | |
| uses: ./ | |
| with: | |
| version: latest | |
| - name: Verify nais CLI installation | |
| run: | | |
| echo "PATH: $PATH" | |
| echo "Checking if nais is in PATH..." | |
| which nais || echo "nais not found in PATH" | |
| ls -la ~/.local/bin/ || echo "~/.local/bin/ not found" | |
| if command -v nais &> /dev/null; then | |
| nais --version | |
| echo "✅ Latest version installed successfully" | |
| else | |
| echo "❌ nais command not found" | |
| exit 1 | |
| fi | |
| test-specific-version: | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # ratchet:actions/checkout@v6 | |
| - name: Setup Mise | |
| uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # ratchet:jdx/mise-action@v3 | |
| with: | |
| cache: false | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build action | |
| run: npm run build | |
| - name: Test action (specific version) | |
| uses: ./ | |
| with: | |
| version: "v3.8.3" | |
| - name: Verify specific version | |
| run: | | |
| echo "PATH: $PATH" | |
| echo "Checking if nais is in PATH..." | |
| which nais || echo "nais not found in PATH" | |
| ls -la ~/.local/bin/ || echo "~/.local/bin/ not found" | |
| if command -v nais &> /dev/null; then | |
| nais --version | |
| version_output=$(nais --version) | |
| if [[ "$version_output" == *"3.8.3"* ]]; then | |
| echo "✅ Correct version v3.8.3 installed successfully" | |
| else | |
| echo "❌ Expected version v3.8.3, but got: $version_output" | |
| exit 1 | |
| fi | |
| else | |
| echo "❌ nais command not found" | |
| exit 1 | |
| fi |