Updated package artifact url #276
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
env: | |
project: PopCameraDevice | |
on: | |
push: | |
branches: | |
- master | |
- '*Test*' | |
tags: | |
- v* | |
watch: | |
types: [started] | |
jobs: | |
Build: | |
name: ${{ matrix.config.os }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
matrix: | |
config: | |
- os: ubuntu-latest | |
type: linux | |
arch: x86_64 | |
# disabled whilst not nvidia runner | |
#- os: Nvidia | |
# type: linux | |
# arch: arm64 | |
# tsdk: not compiling for the pi | |
# - os: Pi4 | |
# type: linux | |
# arch: arm64 | |
- os: windows-latest | |
type: x64 | |
- os: macos-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Configure Windows | |
if: matrix.config.os == 'windows-latest' | |
uses: microsoft/[email protected] | |
- name: Windows | |
if: matrix.config.os == 'windows-latest' | |
uses: NewChromantics/PopAction_BuildWindows@v1 | |
with: | |
BuildPlatform: x64 | |
BuildConfiguration: Release | |
# would be nice to extract this from visual studio | |
BuildDirectory: Build\Release_x64 | |
project: ${{ env.project }} | |
- name: "Import Apple-Distriubution NewChromantics Signing Certificate" | |
if: matrix.config.os == 'macos-latest' | |
uses: NewChromantics/[email protected] | |
with: | |
certificate-data: ${{ secrets.APPLE_DIST_NEWCHROMANTICS_P12 }} | |
certificate-passphrase: ${{ secrets.APPLE_DIST_NEWCHROMANTICS_PASSWORD }} | |
keychain-password: "Hello" | |
- name: Apple | |
id: Apple | |
if: matrix.config.os == 'macos-latest' | |
uses: NewChromantics/[email protected] | |
with: | |
BuildScheme: ${{ env.project }}_Universal | |
project: ${{ env.project }} | |
- name: Linux | |
if: matrix.config.type == 'linux' | |
uses: NewChromantics/PopAction_BuildLinux@v1 | |
with: | |
os: ${{ matrix.config.os }} | |
project: ${{ env.project }} | |
arch: ${{ matrix.config.arch }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
# tsdk: these env vars are set in each of the actions | |
name: ${{ env.UPLOAD_NAME }} | |
path: ${{ env.UPLOAD_DIR }} | |
publish-gpr: | |
needs: Build | |
runs-on: ubuntu-latest | |
steps: | |
# Download artifacts into Packaging dir | |
- uses: actions/checkout@v2 | |
- name: Download build artifacts | |
uses: actions/[email protected] | |
with: | |
path: ${{ env.project }}.Package/ | |
# copy files we want in the release/package into the package dir | |
- name: Copy files for packaging | |
run: | | |
echo Copying files into $PACKAGE_DIR | |
echo Project is ${{ env.project }} | |
echo Project2 is $project | |
cp Readme.md $PACKAGE_DIR | |
env: | |
PACKAGE_DIR: ${{ env.project }}.Package/ | |
# setup node for npm packaging | |
- name: Make github package | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
registry-url: https://npm.pkg.github.com/ | |
# set dry-run if this isn't a tag so npm publish will run, but not do anything (and not fail) | |
- name: Set npm publish as dry-run | |
if: startsWith(github.ref, 'refs/tags/v') != true | |
run: echo "NPM_PACKAGE_DRY_RUN=--dry-run" >> $GITHUB_ENV | |
# copy files we want to | |
# download github-publish dependencies (ci), then publish from package dir | |
- name: Publish | |
working-directory: ${{ env.project }}.Package/ | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: | | |
ls | |
npm publish $NPM_PACKAGE_DRY_RUN | |
# make a release | |
- name: Make github release | |
# only try and make a release if this is a release (to help testing npm packaging) | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: fnkr/github-action-ghr@v1 | |
env: | |
GHR_COMPRESS: zip | |
GHR_PATH: ${{ env.project }}.Package/ | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |