Skip to content

Commit c123e4f

Browse files
committed
删除老得 发布action
1 parent d57304c commit c123e4f

File tree

2 files changed

+40
-64
lines changed

2 files changed

+40
-64
lines changed

.github/workflows/android.yml

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,45 @@
1-
name: bintrayUpload
1+
name: Publish
22

33
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
8-
4+
release:
5+
# We'll run this workflow when a new GitHub release is created
6+
types: [released]
97
jobs:
10-
build:
11-
8+
publish:
9+
name: Release build and publish
1210
runs-on: ubuntu-latest
13-
1411
steps:
15-
- uses: actions/checkout@v2
16-
- name: set up JDK 1.8
17-
uses: actions/setup-java@v1
18-
with:
19-
java-version: 1.8
20-
- name: Build with Gradle
21-
env:
22-
BINTRAY_APIKEY: ${{ secrets.BINTRAY_APIKEY }}
23-
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
24-
run: ./gradlew :CodeEditText:bintrayUpload
12+
- name: Check out code
13+
uses: actions/checkout@v2
14+
- name: Set up JDK 1.8
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 1.8
18+
19+
# Base64 decodes and pipes the GPG key content into the secret file
20+
- name: Prepare environment
21+
env:
22+
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
23+
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
24+
run: |
25+
git fetch --unshallow
26+
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
27+
28+
# Builds the release artifacts of the library
29+
- name: Release build
30+
run: ./gradlew :CodeEditText:assembleRelease
31+
32+
# Generates other artifacts (javadocJar is optional)
33+
- name: Source jar and dokka
34+
run: ./gradlew :CodeEditText:androidSourcesJar :CodeEditText:javadocJar
35+
36+
# Runs upload, and then closes & releases the repository
37+
- name: Publish to MavenCentral
38+
run: ./gradlew :CodeEditText:publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
39+
env:
40+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
41+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
42+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
43+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
44+
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
45+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}

.github/workflows/publish.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)