Skip to content

Commit 2b36a5c

Browse files
authored
Merge pull request #9 from codenameone/codex/remove-artifact-upload-and-change-ci-release
CI: Publish OTA release on merged PRs to main and remove artifact upload
2 parents d1c2fad + 706c97c commit 2b36a5c

1 file changed

Lines changed: 30 additions & 22 deletions

File tree

.github/workflows/blank.yml

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,45 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI
42

5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only for the "master" branch
8-
push:
9-
branches: [ "master" ]
104
pull_request:
11-
branches: [ "master" ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
5+
branches: ["master"]
6+
push:
7+
branches: ["master"]
148
workflow_dispatch:
159

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10+
permissions:
11+
contents: write
12+
1713
jobs:
18-
# This workflow contains a single job called "build"
1914
build:
20-
# The type of runner that the job will run on
2115
runs-on: ubuntu-latest
2216

23-
# Steps represent a sequence of tasks that will be executed as part of the job
2417
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2719

28-
# Runs a single command using the runners shell
29-
- name: Run a one-line script
20+
- name: Build skins
3021
run: ./build_skins.sh
3122

32-
- name: 'Upload Artifact'
33-
uses: actions/upload-artifact@v3
23+
release:
24+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
25+
needs: build
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Create OTA release archive
32+
run: |
33+
mkdir -p dist
34+
cd OTA
35+
find . -type f ! -path './.*' ! -path '*/.*' -print0 \
36+
| sort -z \
37+
| tar --null -czf "../dist/ota-${GITHUB_SHA}.tar.gz" --files-from -
38+
39+
- name: Publish release
40+
uses: softprops/action-gh-release@v2
3441
with:
35-
name: SamsungGalaxyS7.skin
36-
path: OTA/SamsungGalaxyS7.skin
37-
retention-days: 5
42+
tag_name: ota-${{ github.sha }}
43+
name: OTA Release ${{ github.sha }}
44+
generate_release_notes: true
45+
files: dist/ota-${{ github.sha }}.tar.gz

0 commit comments

Comments
 (0)