Skip to content

Workflow file for this run

name: Build and upload artifact
on:
release:
types: [created]
jobs:
build-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install packages
run: |
npm install
- name: Build
run: |
npm run build
- name: build artifact
working-directory: ./dist
run: tar -czvf dist.tar.gz index.js
- name: upload artifact
uses: AButler/upload-release-assets@v3.0
with:
files: "dist/dist.tar.gz"
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.release.tag_name }}
- name: Slack
uses: codio/codio-slack-action@master
if: always()
with:
slack_hook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
message: "<https://github.com/${{ github.repository }}/actions/runs/${{github.run_id}}|${{ github.workflow }} release> for ${{ github.repository }} by ${{ github.actor }} has ${{ job.status }} on branch ${{ github.ref_name }}"
success: ${{ job.status }}