3.0.4 #37
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: Release | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v2.1.3 | |
jobs: | |
build: | |
if: github.repository_owner == 'asciidoctor' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
# libgbm-dev is required by Puppeteer 3+ | |
- name: Install system dependencies | |
run: | | |
sudo apt-get install -y libgbm-dev | |
- name: Install dependencies | |
run: | | |
npm ci | |
npm ci --prefix packages/core | |
- name: Lint, build and test | |
env: | |
ASCIIDOCTOR_CORE_VERSION: v2.0.20 | |
run: | | |
npm run lint | |
npm run test | |
npm run travis --prefix packages/core | |
publish: | |
if: github.repository_owner == 'asciidoctor' | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
# libgbm-dev is required by Puppeteer 3+ | |
- name: Install system dependencies | |
run: | | |
sudo apt-get install -y libgbm-dev | |
# install dependencies | |
- name: Install dependencies | |
run: | | |
npm ci | |
npm ci --prefix packages/core | |
# package and publish | |
- name: Package | |
env: | |
ASCIIDOCTOR_CORE_VERSION: v2.0.20 | |
run: ./scripts/package.sh | |
- name: Publish | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: ./scripts/publish.sh | |
- name: Make sure that @asciidoctor/core has been published on npmjs | |
run: | | |
timeout 60s ./scripts/wait-asciidoctor-core-published.sh | |
- name: Produce binaries | |
run: ./scripts/binaries.sh | |
# create the GitHub release | |
- name: Create release | |
id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
# upload assets | |
- name: Upload source code as a zip file | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: packages/core/bin/asciidoctor.js.dist.zip | |
asset_name: asciidoctor.js.dist.zip | |
asset_content_type: application/zip | |
- name: Upload source code as a tar.gz file | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: packages/core/bin/asciidoctor.js.dist.tar.gz | |
asset_name: asciidoctor.js.dist.tar.gz | |
asset_content_type: application/tar+gzip | |
- name: Upload Linux binary | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: packages/asciidoctor/dist/asciidoctor-linux | |
asset_name: asciidoctor-linux | |
asset_content_type: application/octet-stream | |
- name: Upload macOS binary | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: packages/asciidoctor/dist/asciidoctor-macos | |
asset_name: asciidoctor-macos | |
asset_content_type: application/octet-stream | |
- name: Upload Windows binary | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: packages/asciidoctor/dist/asciidoctor-win.exe | |
asset_name: asciidoctor-win.exe | |
asset_content_type: application/octet-stream | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Announcement | |
uses: zulip/github-actions-zulip/send-message@v1 | |
with: | |
email: ${{ secrets.ZULIP_USERNAME }} | |
api-key: ${{ secrets.ZULIP_API_KEY }} | |
organization-url: 'https://asciidoctor.zulipchat.com' | |
to: '279652' | |
type: 'stream' | |
topic: 'releases' | |
content: | | |
Asciidoctor.js ${{ env.RELEASE_VERSION }} is out! | |
https://github.com/asciidoctor/asciidoctor.js/releases/tag/${{ env.RELEASE_VERSION }} |