forked from ansible/ansible-hub-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 2.09 KB
/
dev-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
# Updates the "dev" github release whenever new changes are merged into master.
# This provides an up to date tarball that https://github.com/ansible/galaxy_ng can use.
name: "Dev release"
on:
workflow_dispatch: # allow running manually
push:
branches: [ 'master' ]
jobs:
dev:
runs-on: ubuntu-latest
env:
BRANCH: 'master' # for webpack
NODE_OPTIONS: "--max-old-space-size=4096 --max_old_space_size=4096"
RH_GALAXY_DROID_GITHUB_TOKEN: ${{ secrets.RH_GALAXY_DROID_GITHUB_TOKEN }}
steps:
- name: "Checkout ansible-hub-ui (${{ github.ref }})"
uses: actions/checkout@v2
- name: "Install node 14"
uses: actions/setup-node@v2
with:
node-version: '14'
- name: "Update the dev tag"
run: |
git config --local user.name "rh-galaxy-droid"
git config --local user.email "[email protected]"
git tag -f dev
git push -fq https://rh-galaxy-droid:[email protected]/ansible/ansible-hub-ui --tags
- name: "Cache ~/.npm"
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.GITHUB_REF }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.GITHUB_REF }}-
${{ runner.os }}-node-
- name: "Build a tarball"
run: |
npm ci || npm install
npm run build-standalone
tar -C dist/ -czvf automation-hub-ui-dist.tar.gz .
- name: "Release"
run: |
gh release create -p "$RELEASE_TAG" --title "$RELEASE_NAME" --notes "$RELEASE_BODY" || true # may already exist
gh release upload "$RELEASE_TAG" "$RELEASE_FILE" --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: "UI Dev Release"
RELEASE_BODY: "This is a special release that provides an up to date build off of the latest changes in the `master` branch. The `automation-hub-ui-dist.tar.gz` artifact provided here corresponds to the latest version of `master`."
RELEASE_FILE: 'automation-hub-ui-dist.tar.gz'
RELEASE_TAG: 'dev'