AG-37952 Fix init command in CLI #22
Workflow file for this run
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: Create GitHub Release | |
env: | |
NODE_VERSION: 20 | |
on: | |
push: | |
tags: | |
- v* | |
# Workflow need write access to the repository to create a release | |
permissions: | |
contents: write | |
# Make sure that only one release workflow runs at a time | |
concurrency: | |
group: release | |
jobs: | |
release: | |
name: Create GitHub release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://registry.npmjs.org | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Check TypeScript types | |
run: yarn check-types | |
- name: Run Markdownlint | |
run: yarn lint:md | |
- name: Run ESLint | |
run: yarn lint:ts | |
- name: Run Jest tests | |
run: yarn test | |
- name: Run Rollup build | |
run: yarn build | |
- name: Pack files | |
run: yarn pack --filename aglint.tgz | |
- name: Release on GitHub | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
aglint.tgz | |
dist/aglint.iife.min.js | |
dist/aglint.umd.min.js | |
draft: false | |
prerelease: false | |
# TODO: Extract data from CHANGELOG.md | |
body: See [CHANGELOG.md](./CHANGELOG.md) for the list of changes. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
notify: | |
name: Send Slack notification | |
needs: release | |
# Note: 'always()' is needed to run the notify job even if the test job was failed | |
if: | |
${{ | |
always() && | |
github.repository == 'AdguardTeam/AGLint' && | |
github.event_name == 'push' | |
}} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send Slack notification | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ needs.release.result }} | |
fields: workflow, repo, message, commit, author, eventName, ref, job | |
job_name: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |