docs: Опечатался позорно #17
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: Release CI/CD | |
on: | |
push: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: npm install | |
working-directory: ./blurhasher | |
- name: Run linter | |
run: npm run lint | |
working-directory: ./blurhasher | |
build: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: npm install | |
working-directory: ./blurhasher | |
- name: Build | |
run: npm run build | |
working-directory: ./blurhasher | |
- name: Archive built files | |
run: tar -czvf build.tar.gz -C ./blurhasher dist package.json package-lock.json | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: built-files | |
path: build.tar.gz | |
semantic-release: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: built-files | |
path: ./blurhasher | |
- name: Semantic Release | |
run: npx semantic-release | |
working-directory: ./blurhasher | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |