forked from jitsi/lib-jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.78 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Release
on:
workflow_dispatch:
inputs:
branch:
description: 'Target branch'
required: true
type: string
tag:
description: 'Target tag'
required: true
type: string
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# The branch, tag or SHA to checkout. When checking out the repository that
# triggered a workflow, this defaults to the reference or SHA for that event.
# Otherwise, uses the default branch.
ref: ${{ inputs.branch }}
# Whether to fetch tags, even if fetch-depth > 0.
# Default: false
fetch-tags: true
- name: Real SHA
run: |
# Workaround due to https://github.com/rickstaa/action-create-tag/issues/36
echo "GITHUB_SHA=$(git log -1 --format='%H')" >> "$GITHUB_ENV"
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'npm'
- name: Build & Bundle
run: |
npm ci
export LIB_JITSI_MEET_COMMIT_HASH=${{ inputs.tag }}
npm pack
mv lib-jitsi-meet-0.0.0.tgz lib-jitsi-meet.tgz
- name: Create Tag
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git tag -f -a ${{ inputs.tag }} -m "Release ${{ inputs.tag }}"
git push -f origin ${{ inputs.tag }}
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
prerelease: true
fail_on_unmatched_files: true
files: |
lib-jitsi-meet.tgz