Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
qinghui-xu authored Aug 24, 2024
1 parent 8bb8d67 commit 2aadf93
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ jobs:
run: |
ln -sfn ${{ github.workspace }}/build/release-artifacts/protoc-${{ env.proto_version }}-${{ matrix.os_family }}-${{ matrix.arch }}.exe ${{ github.workspace }}/protoc
cd ${{ github.workspace }}/java
mvn versions:set -DnewVersion="${{ env.proto_version }}" -DprocessAllModules=true
mvn versions:set -DnewVersion=${{ env.proto_version }} -DprocessAllModules=true
mvn package -pl core -am -DskipTests
mvn source:jar -pl core
cp pom.xml ${{ github.workspace }}/build/release-artifacts/protobuf-parent.${{ env.proto_version }}.pom
cp core/pom.xml ${{ github.workspace }}/build/release-artifacts/protobuf-java.${{ env.proto_version }}.pom
cp protoc/pom.xml ${{ github.workspace }}/build/release-artifacts/protoc.${{ env.proto_version }}.pom
mv core/target/protobuf*.jar ${{ github.workspace }}/build/release-artifacts/
- name: Upload release artifacts
- name: Upload artifacts
uses: actions/[email protected]
with:
name: artifacts-${{ env.proto_version }}-${{ matrix.os_family }}-${{ matrix.arch }}
Expand All @@ -120,10 +121,13 @@ jobs:
needs: build-release-assets
runs-on: ubuntu-latest
steps:
- name: Create layout
- name: Prepare environment
run: |
mkdir protobuf-dist-${{ github.ref_name }}
proto_tag="${{ github.ref_name }}"
proto_version=${proto_tag#v}
mkdir protobuf-dist-$proto_version
mkdir download
echo "proto_version=$proto_version" >> "$GITHUB_ENV"
- name: Download artifacts
uses: actions/[email protected]
Expand All @@ -134,15 +138,14 @@ jobs:
- name: Package artifacts
run: |
ls -l download/*
mv download/*/* protobuf-dist-${{ github.ref_name }}/
chmod +x protobuf-dist-${{ github.ref_name }}/protoc-*.exe
ls -l protobuf-dist-${{ github.ref_name }}
tar -czf protobuf-dist-${{ github.ref_name }}.tar.gz protobuf-dist-${{ github.ref_name }}
tar -tf protobuf-dist-${{ github.ref_name }}.tar.gz
mv download/*/* protobuf-dist-${{ env.proto_version }}/
chmod +x protobuf-dist-${{ env.proto_version }}/protoc-*.exe
ls -l protobuf-dist-${{ env.proto_version }}/
tar -czf protobuf-dist-${{ env.proto_version }}.tar.gz protobuf-dist-${{ env.proto_version }}
- name: Publish artifact
uses: softprops/[email protected]
with:
files: |
protobuf-dist-${{ github.ref_name }}.tar.gz
protobuf-dist-${{ env.proto_version }}.tar.gz

0 comments on commit 2aadf93

Please sign in to comment.