diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d288dd724e..0f6ada08ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,88 +6,88 @@ on: description: "Version Number" required: true jobs: - java: - name: Publish java jar to maven repository - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GithubToken: ${{ secrets.GITHUB_TOKEN }} - GPGPassphrase: ${{ secrets.PASSPHRASE }} - JiraUser: ${{ secrets.JIRAUSER }} - JiraPassword: ${{ secrets.JIRAPASSWORD }} - steps: - - uses: actions/checkout@v2 - with: - ref: "v${{ github.event.inputs.version }}" - - name: Import GPG key - id: import_gpg - uses: crazy-max/ghaction-import-gpg@v2 - env: - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - PASSPHRASE: ${{ secrets.PASSPHRASE }} - - name: GPG user IDs - run: | - echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}" - echo "keyid: ${{ steps.import_gpg.outputs.keyid }}" - echo "name: ${{ steps.import_gpg.outputs.name }}" - echo "email: ${{ steps.import_gpg.outputs.email }}" - - run: | - curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" $(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/osohq/oso/releases/tags/v${{ github.event.inputs.version }} | jq -r '.assets[] | select(.name == "oso-lib-${{ github.event.inputs.version }}.zip") | .url') --output oso-lib-${{ github.event.inputs.version }}.zip - - run: unzip oso-lib-${{ github.event.inputs.version }}.zip -d oso-lib-${{ github.event.inputs.version }} - - uses: actions/setup-java@v1 - with: - java-version: "10" - - name: Copy libraries into resources. - run: | - mkdir -p languages/java/oso/src/main/resources/linux - cp -r oso-lib-${{ github.event.inputs.version }}/libpolar.so languages/java/oso/src/main/resources/linux/ - mkdir -p languages/java/oso/src/main/resources/macos - cp -r oso-lib-${{ github.event.inputs.version }}/libpolar.dylib languages/java/oso/src/main/resources/macos/ - mkdir -p languages/java/oso/src/main/resources/win - cp -r oso-lib-${{ github.event.inputs.version }}/polar.dll languages/java/oso/src/main/resources/win/ - - run: | - GPG_TTY=$(tty) mvn -q clean source:jar deploy -DuniqueVersion=false -Dmaven.source.useDefaultManifestFile=true -DdeplyAtEnd=true -Dmaven.source.includePom=true -Dmaven.install.skip=true --settings settings.xml - working-directory: languages/java/oso - python: - name: Publish python package to pypi - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - steps: - - uses: actions/checkout@v2 - with: - ref: "v${{ github.event.inputs.version }}" - - run: | - curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" $(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/osohq/oso/releases/tags/v${{ github.event.inputs.version }} | jq -r '.assets[] | select(.name == "oso-python-${{ github.event.inputs.version }}.zip") | .url') --output oso-python-${{ github.event.inputs.version }}.zip - - run: unzip oso-python-${{ github.event.inputs.version }}.zip -d oso-python-${{ github.event.inputs.version }} - - uses: actions/setup-python@v2 - name: Install Python - with: - python-version: "3.7" - - run: pip install twine - - run: twine upload oso-python-${{ github.event.inputs.version }}/*.whl --non-interactive - ruby: - name: Publish ruby gem to rubygems - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} - steps: - - uses: actions/checkout@v2 - with: - ref: "v${{ github.event.inputs.version }}" - - run: | - curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" $(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/osohq/oso/releases/tags/v${{ github.event.inputs.version }} | jq -r '.assets[] | select(.name == "oso-ruby-${{ github.event.inputs.version }}.zip") | .url') --output oso-ruby-${{ github.event.inputs.version }}.zip - - run: unzip oso-ruby-${{ github.event.inputs.version }}.zip -d oso-ruby-${{ github.event.inputs.version }} - - name: Set up ruby ${{ matrix.ruby-version }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: "2.7" - working-directory: "languages/ruby" - - run: gem push oso-oso-${{ github.event.inputs.version }}.gem - working-directory: "oso-ruby-${{ github.event.inputs.version }}" + # java: + # name: Publish java jar to maven repository + # runs-on: ubuntu-latest + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # GithubToken: ${{ secrets.GITHUB_TOKEN }} + # GPGPassphrase: ${{ secrets.PASSPHRASE }} + # JiraUser: ${{ secrets.JIRAUSER }} + # JiraPassword: ${{ secrets.JIRAPASSWORD }} + # steps: + # - uses: actions/checkout@v2 + # with: + # ref: "v${{ github.event.inputs.version }}" + # - name: Import GPG key + # id: import_gpg + # uses: crazy-max/ghaction-import-gpg@v2 + # env: + # GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + # PASSPHRASE: ${{ secrets.PASSPHRASE }} + # - name: GPG user IDs + # run: | + # echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}" + # echo "keyid: ${{ steps.import_gpg.outputs.keyid }}" + # echo "name: ${{ steps.import_gpg.outputs.name }}" + # echo "email: ${{ steps.import_gpg.outputs.email }}" + # - run: | + # curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" $(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/osohq/oso/releases/tags/v${{ github.event.inputs.version }} | jq -r '.assets[] | select(.name == "oso-lib-${{ github.event.inputs.version }}.zip") | .url') --output oso-lib-${{ github.event.inputs.version }}.zip + # - run: unzip oso-lib-${{ github.event.inputs.version }}.zip -d oso-lib-${{ github.event.inputs.version }} + # - uses: actions/setup-java@v1 + # with: + # java-version: "10" + # - name: Copy libraries into resources. + # run: | + # mkdir -p languages/java/oso/src/main/resources/linux + # cp -r oso-lib-${{ github.event.inputs.version }}/libpolar.so languages/java/oso/src/main/resources/linux/ + # mkdir -p languages/java/oso/src/main/resources/macos + # cp -r oso-lib-${{ github.event.inputs.version }}/libpolar.dylib languages/java/oso/src/main/resources/macos/ + # mkdir -p languages/java/oso/src/main/resources/win + # cp -r oso-lib-${{ github.event.inputs.version }}/polar.dll languages/java/oso/src/main/resources/win/ + # - run: | + # GPG_TTY=$(tty) mvn -q clean source:jar deploy -DuniqueVersion=false -Dmaven.source.useDefaultManifestFile=true -DdeplyAtEnd=true -Dmaven.source.includePom=true -Dmaven.install.skip=true --settings settings.xml + # working-directory: languages/java/oso + # python: + # name: Publish python package to pypi + # runs-on: ubuntu-latest + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + # steps: + # - uses: actions/checkout@v2 + # with: + # ref: "v${{ github.event.inputs.version }}" + # - run: | + # curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" $(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/osohq/oso/releases/tags/v${{ github.event.inputs.version }} | jq -r '.assets[] | select(.name == "oso-python-${{ github.event.inputs.version }}.zip") | .url') --output oso-python-${{ github.event.inputs.version }}.zip + # - run: unzip oso-python-${{ github.event.inputs.version }}.zip -d oso-python-${{ github.event.inputs.version }} + # - uses: actions/setup-python@v2 + # name: Install Python + # with: + # python-version: "3.7" + # - run: pip install twine + # - run: twine upload oso-python-${{ github.event.inputs.version }}/*.whl --non-interactive + # ruby: + # name: Publish ruby gem to rubygems + # runs-on: ubuntu-latest + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} + # steps: + # - uses: actions/checkout@v2 + # with: + # ref: "v${{ github.event.inputs.version }}" + # - run: | + # curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" $(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/osohq/oso/releases/tags/v${{ github.event.inputs.version }} | jq -r '.assets[] | select(.name == "oso-ruby-${{ github.event.inputs.version }}.zip") | .url') --output oso-ruby-${{ github.event.inputs.version }}.zip + # - run: unzip oso-ruby-${{ github.event.inputs.version }}.zip -d oso-ruby-${{ github.event.inputs.version }} + # - name: Set up ruby ${{ matrix.ruby-version }} + # uses: ruby/setup-ruby@v1 + # with: + # ruby-version: "2.7" + # working-directory: "languages/ruby" + # - run: gem push oso-oso-${{ github.event.inputs.version }}.gem + # working-directory: "oso-ruby-${{ github.event.inputs.version }}" js: name: Publish Node.js package to NPM runs-on: ubuntu-latest diff --git a/docs/Makefile b/docs/Makefile index faf083d044..5f28a010b7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,7 +15,7 @@ export JAVA_DIR := $(abspath ../languages/java/oso) rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d)) -JAVA_PACKAGE_JAR_PATH := $(JAVA_DIR)/target/oso-0.4.1-rc2.jar +JAVA_PACKAGE_JAR_PATH := $(JAVA_DIR)/target/oso-0.4.1-rc3.jar RUBY_FILES := $(call rwildcard,../languages/ruby/lib,*.rb) JAVA_FILES := $(call rwildcard ../languages/java/oso/src, *.java) diff --git a/docs/conf.py b/docs/conf.py index 9e351eb93d..99c45c05d7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,7 +29,7 @@ copyright = "2020 Oso Security, Inc" author = "oso" version = "0.4" -release = "0.4.1-rc2" +release = "0.4.1-rc3" # -- General configuration --------------------------------------------------- diff --git a/languages/java/oso/pom.xml b/languages/java/oso/pom.xml index c4daa5149f..62e7be49e0 100644 --- a/languages/java/oso/pom.xml +++ b/languages/java/oso/pom.xml @@ -12,7 +12,7 @@ com.osohq oso - 0.4.1-rc2 + 0.4.1-rc3 diff --git a/languages/js/package.json b/languages/js/package.json index 66bfcc83d1..6296df8a4d 100644 --- a/languages/js/package.json +++ b/languages/js/package.json @@ -1,6 +1,6 @@ { "name": "oso", - "version": "0.4.1-rc2", + "version": "0.4.1-rc3", "description": "Oso authorization library.", "main": "dist/src/index.js", "repository": "https://github.com/osohq/oso", diff --git a/languages/python/oso/oso/oso.py b/languages/python/oso/oso/oso.py index 076d446ee9..fbe107629c 100644 --- a/languages/python/oso/oso/oso.py +++ b/languages/python/oso/oso/oso.py @@ -1,6 +1,6 @@ """Core oso functionality""" -__version__ = "0.4.1-rc2" +__version__ = "0.4.1-rc3" from pathlib import Path import os diff --git a/languages/ruby/Gemfile.lock b/languages/ruby/Gemfile.lock index e0285d1f7a..6094cb8239 100644 --- a/languages/ruby/Gemfile.lock +++ b/languages/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - oso-oso (0.4.1.pre.rc2) + oso-oso (0.4.1.pre.rc3) ffi (~> 1.0) GEM diff --git a/languages/ruby/lib/oso/version.rb b/languages/ruby/lib/oso/version.rb index 17530f2a2e..ecb4724fef 100644 --- a/languages/ruby/lib/oso/version.rb +++ b/languages/ruby/lib/oso/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Oso - VERSION = '0.4.1-rc2' + VERSION = '0.4.1-rc3' end