-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (48 loc) · 1.42 KB
/
extension-build-publish.yaml
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
#
# Copyright (c) 2020 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: Extension Build and Publish
on:
push:
paths:
- '**/extension.json'
- '**/Dockerfile'
branches:
- main
jobs:
build-push:
runs-on: ubuntu-20.04
steps:
- name: Clone source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate release info
id: release-info
run: |
echo "::set-output name=release-tag::$(git rev-parse --short HEAD)"
echo "::set-output name=release-body::$(git log --format=%B -n 1 HEAD)"
- name: Push tag
id: tag_version
uses: mathieudutour/github-tag-action@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.release-info.outputs.release-tag }}
- name: Build extension, copy vsix and source tarball
run: |
./.ci/extension_build_publish.sh build-publish HEAD^1 HEAD
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./*.vsix
./*.tar.gz
tag_name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.release-info.outputs.release-body }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}