Skip to content

Commit

Permalink
fix(ci): windows stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
manuandru committed Mar 15, 2024
1 parent 1fdcc52 commit 6e502e9
Showing 1 changed file with 91 additions and 83 deletions.
174 changes: 91 additions & 83 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,89 +18,97 @@ jobs:
group: build-${{ github.workflow }}-${{ matrix.os }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: DanySK/action-checkout@0.2.14
- uses: actions/setup-node@v4
if: matrix.os == 'windows-2022'
# - name: Checkout
# uses: DanySK/action-checkout@0.2.14
- name: setup node
uses: actions/setup-node@v4.0.2
with:
node-version: 18
cache: 'npm'
- uses: DanySK/build-check-deploy-gradle-action@2.4.8
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
# Dry-deployment
check-command: ./gradlew build --parallel
deploy-command: >-
./gradlew
uploadKotlinOSSRHToMavenCentralNexus
uploadPluginMavenToMavenCentralNexus
uploadPluginMarkerMavenToMavenCentralNexus
close
drop
--parallel
should-run-codecov: ${{ runner.os == 'Linux' }}
should-deploy: >-
${{
runner.os == 'Linux'
&& !github.event.repository.fork
&& github.event_name != 'pull_request'
}}
maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
signing-key: ${{ secrets.SIGNING_KEY }}
signing-password: ${{ secrets.SIGNING_PASSWORD }}
release:
permissions:
contents: write
packages: write
concurrency:
# Only one release job at a time. Strictly sequential.
group: release
needs:
- build
runs-on: ubuntu-22.04
if: >-
!github.event.repository.fork
&& github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
# cache: 'npm'
- name: Set up NPM for Windows
run: |
ls $(npm config get prefix)
echo "$(npm config get prefix)/etc" >> $GITHUB_PATH
# - uses: DanySK/build-check-deploy-gradle-action@2.4.8
# with:
# token: ${{ secrets.DEPLOYMENT_TOKEN }}
- name: Find the version of Node from package.json
id: node-version
run: echo "version=$(jq -r .engines.node package.json)" >> $GITHUB_OUTPUT
- name: Install Node
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ steps.node-version.outputs.version }}
- uses: DanySK/build-check-deploy-gradle-action@2.4.8
with:
build-command: true
check-command: true
deploy-command: |
npm install
npx semantic-release
should-run-codecov: false
should-deploy: true
github-token: ${{ github.token }}
gradle-publish-secret: ${{ secrets.GRADLE_PUBLISH_SECRET }}
gradle-publish-key: ${{ secrets.GRADLE_PUBLISH_KEY }}
maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
signing-key: ${{ secrets.SIGNING_KEY }}
signing-password: ${{ secrets.SIGNING_PASSWORD }}
success:
runs-on: ubuntu-22.04
needs:
- release
- build
if: >-
always() && (
contains(join(needs.*.result, ','), 'failure')
|| !contains(join(needs.*.result, ','), 'cancelled')
)
steps:
- name: Verify that there were no failures
run: ${{ !contains(join(needs.*.result, ','), 'failure') }}
# build-command: ./gradlew build --parallel
# should-run-codecov: false
# - uses: DanySK/build-check-deploy-gradle-action@2.4.8
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# with:
## Dry-deployment
# check-command: ./gradlew build --parallel
# deploy-command: >-
# ./gradlew
# uploadKotlinOSSRHToMavenCentralNexus
# uploadPluginMavenToMavenCentralNexus
# uploadPluginMarkerMavenToMavenCentralNexus
# close
# drop
# --parallel
# should-run-codecov: ${{ runner.os == 'Linux' }}
# should-deploy: >-
# ${{
# runner.os == 'Linux'
# && !github.event.repository.fork
# && github.event_name != 'pull_request'
# }}
# maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
# maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
# signing-key: ${{ secrets.SIGNING_KEY }}
# signing-password: ${{ secrets.SIGNING_PASSWORD }}
# release:
# permissions:
# contents: write
# packages: write
# concurrency:
# # Only one release job at a time. Strictly sequential.
# group: release
# needs:
# - build
# runs-on: ubuntu-22.04
# if: >-
# !github.event.repository.fork
# && github.event_name != 'pull_request'
# steps:
# - name: Checkout
# uses: actions/checkout@v4.1.1
## with:
## token: ${{ secrets.DEPLOYMENT_TOKEN }}
# - name: Find the version of Node from package.json
# id: node-version
# run: echo "version=$(jq -r .engines.node package.json)" >> $GITHUB_OUTPUT
# - name: Install Node
# uses: actions/setup-node@v4.0.2
# with:
# node-version: ${{ steps.node-version.outputs.version }}
# - uses: DanySK/build-check-deploy-gradle-action@2.4.8
# with:
# build-command: true
# check-command: true
# deploy-command: |
# npm install
# npx semantic-release
# should-run-codecov: false
# should-deploy: true
# github-token: ${{ github.token }}
# gradle-publish-secret: ${{ secrets.GRADLE_PUBLISH_SECRET }}
# gradle-publish-key: ${{ secrets.GRADLE_PUBLISH_KEY }}
# maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
# maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
# signing-key: ${{ secrets.SIGNING_KEY }}
# signing-password: ${{ secrets.SIGNING_PASSWORD }}
# success:
# runs-on: ubuntu-22.04
# needs:
# - release
# - build
# if: >-
# always() && (
# contains(join(needs.*.result, ','), 'failure')
# || !contains(join(needs.*.result, ','), 'cancelled')
# )
# steps:
# - name: Verify that there were no failures
# run: ${{ !contains(join(needs.*.result, ','), 'failure') }}

0 comments on commit 6e502e9

Please sign in to comment.