Skip to content

Commit

Permalink
Workflow experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
wkal-pubnub committed Dec 2, 2024
1 parent 6bb0d82 commit 6300d5f
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 52 deletions.
105 changes: 58 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ on:
pull_request:
branches: [master]
types: [closed]
push:
branches:
- 'wkal/js_size_optim'

jobs:
check-release:
name: Check release required
if: github.event.pull_request.merged && endsWith(github.repository, '-private') != true
if: endsWith(github.repository, '-private') != true
runs-on:
group: organization/Default
group: macos-gh
outputs:
release: ${{ steps.check.outputs.ready }}
steps:
Expand All @@ -26,52 +29,60 @@ jobs:
uses: ./.github/.release/actions/actions/checks/release
with:
token: ${{ secrets.GH_TOKEN }}
publish:
name: Publish package
needs: check-release
if: needs.check-release.outputs.release == 'true'
runs-on:
group: organization/Default
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# This should be the same as the one specified for on.pull_request.branches
ref: master
submodules: recursive
- name: Checkout actions
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
token: ${{ secrets.GH_TOKEN }}
path: .github/.release/actions
- name: Publish to Maven
uses: ./.github/.release/actions/actions/services/maven
with:
token: ${{ secrets.GH_TOKEN }}
nexus-username: ${{ secrets.NEXUS_USERNAME }}
nexus-password: ${{ secrets.NEXUS_PASSWORD }}
gpg-key-id: ${{ secrets.GPG_KEY_ID }}
gpg-key-name: ${{ secrets.GPG_KEY_NAME }}
gpg-key-passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
maven-plugin: "new-gradle-nexus-publish"
prepend-product-to-tag: true
- name: Create Release
uses: ./.github/.release/actions/actions/services/github-release
with:
token: ${{ secrets.GH_TOKEN }}
prepend-product-to-tag: true
last-service: true
# - name: Update Pages
# uses: ./.github/.release/actions/actions/services/github-pages
- id: dev
name: dev
run: find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
- id: dev2
name: dev2
run: env
# publish:
# name: Publish package
# needs: check-release
# if: needs.check-release.outputs.release == 'true'
# runs-on:
# group: macos-gh
# steps:
# - name: Find which product is being released
# uses: actions/github-script@v6
# id: check-env
# with:
# result-encoding: string
# script: |
# try {
# const fs = require('fs')
# const jsonString = fs.readFileSync('./dir/file.json')
# var apps = JSON.parse(jsonString)
# } catch(err) {
# core.error("Error while reading or parsing the JSON")
# core.setFailed(err)
# }
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# # This should be the same as the one specified for on.pull_request.branches
# ref: master
# submodules: recursive
# - name: Checkout actions
# uses: actions/checkout@v4
# with:
# repository: pubnub/client-engineering-deployment-tools
# ref: v1
# token: ${{ secrets.GH_TOKEN }}
# path: .github/.release/actions
# - name: Publish to Maven
# uses: ./.github/.release/actions/actions/services/maven
# with:
# token: ${{ secrets.GH_TOKEN }}
# source-folder: build/dokka/gfmMultiModule
# jira-api-key: ${{ secrets.JIRA_API_KEY }}
# last-service: true
# - name: Upload test reports
# uses: ./.github/.release/actions/actions/test-reports/upload
# nexus-username: ${{ secrets.NEXUS_USERNAME }}
# nexus-password: ${{ secrets.NEXUS_PASSWORD }}
# gpg-key-id: ${{ secrets.GPG_KEY_ID }}
# gpg-key-name: ${{ secrets.GPG_KEY_NAME }}
# gpg-key-passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
# maven-plugin: "new-gradle-nexus-publish"
# prepend-product-to-tag: true
# - name: Create Release
# uses: ./.github/.release/actions/actions/services/github-release
# with:
# token: ${{ secrets.GH_TOKEN }}
# acceptance-tests-workflow: Tests
# prepend-product-to-tag: true
# last-service: true
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
tests:
name: Integration and Unit tests
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
name: Tests
needs: [tests]
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Tests summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll tests successfully passed"
6 changes: 3 additions & 3 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pubnub-yml:
name: "Validate .pubnub.yml"
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Checkout project
uses: actions/checkout@v4
Expand All @@ -37,7 +37,7 @@ jobs:
build-validation:
name: Validate build
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
name: Validations
needs: [pubnub-yml, build-validation]
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Validations summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll validations passed"

0 comments on commit 6300d5f

Please sign in to comment.