Skip to content

Commit 5bc0b8e

Browse files
authored
Merge pull request #99 from kshitij-sisodia-arm/feature/mleco-3574
MLECO-3574: Provision to publish cmsis-pack-examples
2 parents 683ac02 + fb776d8 commit 5bc0b8e

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright (c) 2022 Arm Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Sync CMSIS-pack example project into Arm-Examples repo
17+
18+
on:
19+
workflow_dispatch:
20+
push:
21+
branches:
22+
- main
23+
paths:
24+
- cmsis-pack-examples/**
25+
26+
27+
jobs:
28+
publish-cmsis-examples:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
- name: Fetch action
34+
id: get-cmsis-pack-files
35+
uses: Rishabh510/[email protected]
36+
with:
37+
path: "cmsis-pack-examples/"
38+
type: ".yml"
39+
- name: Pushes test file
40+
uses: nkoppel/[email protected]
41+
env:
42+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
43+
with:
44+
source-files: 'cmsis-pack-examples/*'
45+
destination-username: 'Arm-Examples'
46+
destination-repository: 'mlek-corstone-300-examples'
47+
destination-branch: 'main'
48+
commit-email: '[email protected]'
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (c) 2022 Arm Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Publish CMSIS-pack example project zip file
17+
18+
on:
19+
workflow_dispatch:
20+
push:
21+
branches:
22+
- main
23+
paths:
24+
- cmsis-pack-examples/**
25+
26+
jobs:
27+
zip-files:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: vimtor/action-zip@v1
32+
with:
33+
files: cmsis-pack-examples/
34+
recursive: true
35+
dest: cmsis-pack-examples.zip
36+
- name: Create Release
37+
id: create_release
38+
uses: actions/create-release@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
41+
with:
42+
tag_name: ${{ github.run_id }}
43+
release_name: Release ${{ github.run_id }}
44+
body: |
45+
CMSIS example packs release
46+
prerelease: false
47+
draft: false
48+
- name: Upload Release Asset
49+
id: upload-release-asset
50+
uses: actions/upload-release-asset@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
upload_url: ${{ steps.create_release.outputs.upload_url }}
55+
asset_path: ${{ github.workspace }}/cmsis-pack-examples.zip
56+
asset_name: cmsis-pack-examples.zip
57+
asset_content_type: application/zip

0 commit comments

Comments
 (0)