Skip to content

Merge pull request #22 from lilla28/test1 #12

Merge pull request #22 from lilla28/test1

Merge pull request #22 from lilla28/test1 #12

Workflow file for this run

name: Release
on:
release:
types: [ published ]
branches: [ main ]
workflow_call:
workflow_dispatch:
permissions:
contents: read
actions: read
id-token: write
jobs:
build:
uses: ./.github/workflows/continuous-integration.yml
upload:
name: Upload Release Asset
needs: build
runs-on: windows-latest
steps:
# Using shared artifact from build workflow
- name: Set environment variable on feature branch
if: github.ref != 'refs/heads/main'
env:
github.ref_name: test
run: |
echo "ENV variable: ${{ github.ref_name }}"
- name: Download Artifact
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: shell-binaries
path: ${{ github.workspace }}/shell-binaries
- name: Display structure of downloaded files
run: Get-ChildItem -Recurse
working-directory: ${{ github.workspace }}/shell-binaries
- name: Compress
run: |
echo "Path: ${{ github.workspace }}/shell-binaries/"
echo "RefName: ${{ github.ref_name }}"
Compress-Archive -Path ${{ github.workspace }}/shell-binaries/* -DestinationPath ./composeui-test-win32.zip
deploy-npm:
name: Publish Package to npmjs
runs-on: windows-latest
needs: upload
steps:
- name: npm publish --dry-run
- if: github.ref != 'refs/heads/main'
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: |
dir
npm ci
npm run build
npm whoami
npm publish --dry-run --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: ${{ github.workspace }}/src/shell/js/composeui-node-launcher/