0.5.10 #273
This file contains hidden or 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: Build | |
| on: | |
| workflow_dispatch: | |
| inputs: {} | |
| push: | |
| branches: ["main"] | |
| tags: ["v**"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: write | |
| id-token: write | |
| env: | |
| CI_BRANCH_TAG: ${{ github.ref_name }} | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: 7mind/github-env@minimal | |
| - name: Run test build | |
| run: nix develop --command mdl --github-actions :test | |
| publish-scala: | |
| runs-on: ubuntu-latest | |
| needs: [build-test] | |
| steps: | |
| - uses: 7mind/github-env@minimal | |
| - uses: bitwarden/sm-action@v2 | |
| with: | |
| access_token: ${{ secrets.TOKEN_BITWARDEN_SM }} | |
| secrets: | | |
| 994f97a2-97a4-4fe1-806a-b1930104435f > SONATYPE_CREDENTIALS_FILE | |
| 749f4227-9f11-4ceb-9121-b1930110c3a9 > OPENSSL_KEY | |
| a2fe5b5b-5f3f-47f8-961c-b1930110cea7 > OPENSSL_IV | |
| - name: Build and Test | |
| run: | | |
| if [[ "$CI_PULL_REQUEST" == "false" ]] ; then | |
| pushd . | |
| cd json-sick-scala | |
| mkdir .secrets | |
| echo "$SONATYPE_CREDENTIALS_FILE" > ".secrets/credentials.sonatype-nexus.properties" | |
| openssl aes-256-cbc -K "${OPENSSL_KEY}" -iv "${OPENSSL_IV}" -in ../secrets.tar.enc -out secrets.tar -d | |
| tar xvf secrets.tar | |
| popd | |
| fi | |
| nix develop --command mdl --github-actions :publish-scala | |
| publish-sjs: | |
| runs-on: ubuntu-latest | |
| needs: [build-test] | |
| steps: | |
| - uses: 7mind/github-env@minimal | |
| - uses: bitwarden/sm-action@v2 | |
| with: | |
| access_token: ${{ secrets.TOKEN_BITWARDEN_SM }} | |
| secrets: | | |
| 994f97a2-97a4-4fe1-806a-b1930104435f > SONATYPE_CREDENTIALS_FILE | |
| 749f4227-9f11-4ceb-9121-b1930110c3a9 > OPENSSL_KEY | |
| a2fe5b5b-5f3f-47f8-961c-b1930110cea7 > OPENSSL_IV | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| node-version: "24" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Build and Test | |
| run: | | |
| if [[ "$CI_PULL_REQUEST" == "false" ]] ; then | |
| pushd . | |
| cd json-sick-scala | |
| mkdir .secrets | |
| echo "$SONATYPE_CREDENTIALS_FILE" > ".secrets/credentials.sonatype-nexus.properties" | |
| openssl aes-256-cbc -K "${OPENSSL_KEY}" -iv "${OPENSSL_IV}" -in ../secrets.tar.enc -out secrets.tar -d | |
| tar xvf secrets.tar | |
| popd | |
| fi | |
| nix develop --command mdl --github-actions :build-sjs | |
| - uses: softprops/action-gh-release@v2 | |
| id: create-release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| ./json-sick-scala/target/dist/** | |
| - name: Prepare and Publish to npm | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: nix develop --command mdl --github-actions :publish-npm | |
| publish-cs: | |
| runs-on: ubuntu-latest | |
| needs: [build-test] | |
| steps: | |
| - uses: 7mind/github-env@minimal | |
| with: | |
| cache-scala: false | |
| - uses: bitwarden/sm-action@v2 | |
| with: | |
| access_token: ${{ secrets.TOKEN_BITWARDEN_SM }} | |
| secrets: | | |
| 637c5cad-a680-4ea3-ac8b-b193010bee40 > TOKEN_NUGET | |
| - name: Build and Test | |
| run: nix develop --command mdl --github-actions :publish-cs |