Skip to content

Commit

Permalink
test release gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopiraccini committed Dec 13, 2023
1 parent 1a2d58f commit 62d7c04
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: release-draft
on:
workflow_dispatch:
workflow_call:
inputs:
tag_name:
type: string
push:
branches:
- main
Expand All @@ -19,7 +22,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- run: echo "Creating Linux release for tag ${{ github.event.inputs.tag_name }}"
- uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.tag_name }}
- uses: actions/setup-node@v4
with:
node-version: 18
Expand All @@ -38,6 +44,7 @@ jobs:
SM_CLIENT_CERT_FILE: D:\\Certificate_pkcs12.p12
SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
steps:
- run: echo "Creating Windows release for tag ${{ github.event.inputs.tag_name }}"
- name: Set up certificate
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
Expand Down Expand Up @@ -78,6 +85,8 @@ jobs:
node-version: 18

- uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.tag_name }}
- run: npm ci
- run: npm run build:win
- run: npm run release:win
Expand All @@ -92,7 +101,10 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
steps:
- run: echo "Creating Mac release for tag ${{ github.event.inputs.tag_name }}"
- uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.tag_name }}
- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,32 @@ jobs:
name: Prepare release tag
needs: run-test
runs-on: ubuntu-latest
outputs:
TAG: ${{ steps.tag-name.outputs.TAG }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Automated Version Bump'
- id: version-bump
name: 'Automated Version Bump'
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version-type: ${{ github.event.inputs.versionType }}
tag-prefix: 'v'
- name: Export TAG Parameter
id: tag-name
run: |
echo ::set-output name=TAG::`cat package.json | jq -r .version`
shell: bash

create-draft:
needs: prepare-release
# TODO: pass the tag name to the draft release
name: Create Draft Release
uses: platformatic/meraki/.github/workflows/release-draft.yml@main
with:
tag_name: ${{ needs.prepare-release.outputs.TAG }}

release:
name: Release
Expand Down

0 comments on commit 62d7c04

Please sign in to comment.