Skip to content

skipci: Automatic increment build number #11

skipci: Automatic increment build number

skipci: Automatic increment build number #11

Workflow file for this run

name: Create GitHub Release
env:
NODE_VERSION: 18
on:
push:
tags:
- v*
# Workflow need write access to the repository to create a release
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run markdownlint
run: yarn lint:md
- name: Run ESLint
run: yarn lint:ts
# Convert grammar to PList format & Test compile & Run ESBuild & Generate VSIX file
- name: Create production build
run: yarn build:prod
- name: Create build.txt with version
run: yarn build:txt
- name: Extract changelog
run: |
# Import version from out/build.txt
export VERSION=$(cat out/build.txt | cut -d '=' -f2)
yarn extract-changelog -e $VERSION
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
syntaxes/out/adblock.plist
out/vscode-adblock.vsix
draft: false
prerelease: false
body_path: ./out/TEMP_CHANGES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify:
name: Send Slack notification
needs:
- release
if:
${{ always() &&
(
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch'
)
}}
runs-on: ubuntu-latest
steps:
- name: Conclusion
uses: technote-space/workflow-conclusion-action@v3
- name: Send Slack notification
uses: 8398a7/action-slack@v3
with:
status: ${{ env.WORKFLOW_CONCLUSION }}
fields: workflow, repo, message, commit, author, eventName, ref
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}