This repository has been archived by the owner on Jul 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (47 loc) · 2.12 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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Release
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'true'
- id: get_version
uses: battila7/get-version-action@v2
- run: echo ${{ steps.get_version.outputs.version }}
- name: Create directory for ANT keys
run: mkdir -p ${{ github.workspace }}/firmware/nRF5_SDK_16.0.0/components/ant/ant_key_manager/config/
- name: Create ANT keys
uses: RollyPeres/base64-to-path@v1
with:
filePath: ${{ github.workspace }}/firmware/nRF5_SDK_16.0.0/components/ant/ant_key_manager/config/ant_key_manager_config.h
encodedString: ${{ secrets.ANT_KEY_MANAGER_CONFIG }}
- name: make
run: docker run -v $(pwd):/workspace ghcr.io/charliebruce/nrf5-docker-build:sdk-16.0.0 bash -c "cd /workspace/firmware/bootloader/firmware && make && cd /workspace/firmware && make"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: firmware/_build/TSDZ2_wireless_with_SD.hex
asset_name: TSDZ2_wireless_with_SD-${{ steps.get_version.outputs.version }}.hex
asset_content_type: application/zip