Skip to content

Instantly share code, notes, and snippets.

@szul
Created August 17, 2020 17:21
Show Gist options
  • Select an option

  • Save szul/301e6bf08d2b21998d1c9efdd983be86 to your computer and use it in GitHub Desktop.

Select an option

Save szul/301e6bf08d2b21998d1c9efdd983be86 to your computer and use it in GitHub Desktop.

Revisions

  1. szul created this gist Aug 17, 2020.
    45 changes: 45 additions & 0 deletions dev.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    name: DEV CI

    on:
    push:
    branches: [dev]
    paths:
    - 'apps/my-app/**'
    pull_request:
    branches: [dev]
    paths:
    - 'apps/my-app/**'

    jobs:
    build:
    runs-on: [windows-latest]
    strategy:
    matrix:
    node-version: [10.x]
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
    uses: actions/setup-node@v1
    with:
    node-version: ${{ matrix.node-version }}
    - run: |
    npm install
    npm run build --if-present
    npm run test-ci --if-present
    env:
    CI: true
    - run: mkdir ./release
    if: github.repository_owner == 'MY-REPO' && github.event_name == 'push'
    - run: Compress-Archive -Path ./apps/my-app/* -DestinationPath ./release/app.zip
    if: github.repository_owner == 'MY-REPO' && github.event_name == 'push'
    shell: pwsh
    - name: Release with Assets
    if: github.repository_owner == 'MY-REPO' && github.event_name == 'push'
    uses: UVASOMIT/action-release-with-assets@master
    with:
    token: ${{ secrets.GITHUB_TOKEN }}
    commitish: dev
    files: ./release/app.zip
    prerelease: false
    name: Release dev-${{ github.run_id }}
    tag: dev-${{ github.run_id }}