Skip to content

Commit

Permalink
Adding Binary to Release (#1553)
Browse files Browse the repository at this point in the history
* adding binary to release

* fix file names

* adding github token

* creating GH release

* create release before build

* again

* changes to create release as first step

* changes to create release in draft mode

* adding title
  • Loading branch information
webfinesse authored Oct 18, 2024
1 parent 5cebe84 commit 17ae75b
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 5 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/release-layer-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ on:

permissions:
id-token: write
contents: read
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-layer:
runs-on: ubuntu-latest
needs: create-release
strategy:
matrix:
architecture:
Expand All @@ -31,6 +40,11 @@ jobs:
with:
name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip
path: ${{ github.workspace }}/collector/build/opentelemetry-collector-layer-${{ matrix.architecture }}.zip
- name: Add Binary to Release
run: |
gh release upload ${{github.ref_name}} ${{ github.workspace }}/collector/build/opentelemetry-collector-layer-${{ matrix.architecture }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save Collector Version
if: ${{ matrix.architecture == 'amd64' }}
id: save-collector-version
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/release-layer-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ on:

permissions:
id-token: write
contents: read
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-layer:
runs-on: ubuntu-latest
needs: create-release
outputs:
JAVAAGENT_VERSION: ${{ steps.save-javaagent-version.outputs.JAVAAGENT_VERSION }}
JAVAWRAPPER_VERSION: ${{ steps.save-javawrapper-version.outputs.JAVAWRAPPER_VERSION }}
Expand Down Expand Up @@ -44,6 +53,12 @@ jobs:
name: opentelemetry-javawrapper-layer.zip
path: java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip

- name: Add Binary to Release
run: |
gh release upload ${{github.ref_name}} java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Save Javaagent Version
id: save-javaagent-version
shell: bash
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/release-layer-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ on:

permissions:
id-token: write
contents: read
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-layer:
runs-on: ubuntu-latest
needs: create-release
outputs:
NODEJS_VERSION: ${{ steps.save-node-sdk-version.outputs.SDK_VERSION}}
steps:
Expand Down Expand Up @@ -44,6 +53,12 @@ jobs:
with:
name: opentelemetry-nodejs-layer.zip
path: nodejs/packages/layer/build/opentelemetry-nodejs-layer.zip

- name: Add Binary to Release
run: |
gh release upload ${{github.ref_name}} nodejs/packages/layer/build/opentelemetry-nodejs-layer.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-layer:
uses: ./.github/workflows/layer-publish.yml
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/release-layer-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ on:

permissions:
id-token: write
contents: read
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-layer:
runs-on: ubuntu-latest
needs: create-release
outputs:
PYTHON_OPENTELEMETRY_SDK_VERSION: ${{ steps.save-python-opentelemetry-sdk-version.outputs.PYTHON_OPENTELEMETRY_SDK_VERSION}}
steps:
Expand Down Expand Up @@ -52,6 +61,12 @@ jobs:
name: opentelemetry-python-layer.zip
path: python/src/build/opentelemetry-python-layer.zip

- name: Add Binary to Release
run: |
gh release upload ${{github.ref_name}} python/src/build/opentelemetry-python-layer.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-layer:
uses: ./.github/workflows/layer-publish.yml
needs: build-layer
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/release-layer-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ on:

permissions:
id-token: write
contents: read
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-layer:
runs-on: ubuntu-latest
needs: create-release
outputs:
RUBY_SDK_VERSION: ${{ steps.save-ruby-sdk-version.outputs.RUBY_SDK_VERSION}}
steps:
Expand Down Expand Up @@ -43,6 +52,12 @@ jobs:
with:
name: opentelemetry-ruby-layer.zip
path: ruby/src/build/opentelemetry-ruby-layer.zip

- name: Add Binary to Release
run: |
gh release upload ${{github.ref_name}} ruby/src/build/opentelemetry-ruby-layer.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-layer:
uses: ./.github/workflows/layer-publish.yml
Expand Down

0 comments on commit 17ae75b

Please sign in to comment.