π¦ Node Package Manager #30
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: π¦ Node Package Manager | |
on: | |
workflow_run: | |
workflows: ['π€ΉββοΈ Continuous Integration'] | |
types: [completed] | |
jobs: | |
test_version: | |
name: π§ͺ Test Version | |
runs-on: ubuntu-latest | |
steps: | |
- name: π¬ Checkout | |
uses: actions/checkout@v4 | |
- name: π’ Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
registry-url: https://registry.npmjs.org/ | |
- name: π½ Install Dependencies | |
run: npm install | |
- name: π¦ Install Logixlysia | |
run: npm install logixlysia | |
- name: π Check version | |
run: | | |
touch .version | |
ACTUAL_VERSION=$(npm view logixlysia version) | |
EXPECTED_VERSION=$(node -p "require('./package.json').version") | |
echo "Actual version: $ACTUAL_VERSION" >> .version | |
echo "Expected version: $EXPECTED_VERSION" >> .version | |
if [ "$ACTUAL_VERSION" != "$EXPECTED_VERSION" ]; then | |
echo "Version mismatch: expected $EXPECTED_VERSION, got $ACTUAL_VERSION" | |
exit 1 | |
fi | |
- name: πΆβπ«οΈ Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: logs | |
path: | | |
.version |