|
9 | 9 | update-emoji-json:
|
10 | 10 | runs-on: ubuntu-latest
|
11 | 11 | env:
|
12 |
| - VERSION: '' |
13 |
| - RELEASE_URL: '' |
14 |
| - WORKING_DIR: scripts/emoji_generator |
| 12 | + VERSION: "" |
| 13 | + RELEASE_URL: "" |
| 14 | + defaults: |
| 15 | + run: |
| 16 | + working-directory: scripts/emoji_generator |
15 | 17 | steps:
|
16 |
| - - name: Checkout Repository |
17 |
| - uses: actions/checkout@v4 |
18 |
| - - name: Fetch Latest Emojibase Version |
19 |
| - id: fetch_version |
20 |
| - run: | |
| 18 | + - uses: actions/create-github-app-token@v1 |
| 19 | + id: app-token |
| 20 | + with: |
| 21 | + app-id: ${{ secrets.APP_ID }} |
| 22 | + private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 23 | + - name: Checkout Repository |
| 24 | + uses: actions/checkout@v4 |
| 25 | + - name: Fetch Latest Emojibase Version |
| 26 | + id: fetch_version |
| 27 | + run: | |
21 | 28 | RELEASE_INFO=$(curl -s https://api.github.com/repos/milesj/emojibase/releases/latest)
|
22 | 29 | LATEST_RELEASE=$(echo "$RELEASE_INFO" | jq -r '.tag_name')
|
23 | 30 | RELEASE_URL=$(echo "$RELEASE_INFO" | jq -r '.html_url')
|
24 | 31 | echo "VERSION=$(echo \"$LATEST_RELEASE\" | grep -oP '(?<=emojibase-data@)\d+\.\d+\.\d+')" >> $GITHUB_ENV
|
25 | 32 | echo "RELEASE_URL=$RELEASE_URL" >> $GITHUB_ENV
|
26 | 33 |
|
27 |
| - - name: Download emoji-test data |
28 |
| - run: | |
29 |
| - curl -s -o emojify/src/test/resources/io/wax911/emojify/core/emoji-test.txt https://unicode.org/Public/emoji/${{ env.VERSION }}/emoji-test.txt |
30 |
| - |
31 |
| - - name: Setup Python |
32 |
| - uses: actions/setup-python@v5 |
33 |
| - with: |
| 34 | + - name: Download emoji-test data |
| 35 | + run: | |
| 36 | + curl -s -o ../../emojify/src/test/resources/io/wax911/emojify/core/emoji-test.txt https://unicode.org/Public/emoji/${{ env.VERSION }}/emoji-test.txt |
| 37 | +
|
| 38 | + - name: Setup Python |
| 39 | + uses: actions/setup-python@v5 |
| 40 | + with: |
34 | 41 | python-version: "3.10.6"
|
35 | 42 |
|
36 |
| - - name: Install Dependencies |
37 |
| - run: | |
38 |
| - pip install --upgrade pip |
39 |
| - pip install poetry |
40 |
| - poetry config virtualenvs.create true |
41 |
| - poetry install --no-root |
42 |
| -
|
43 |
| - - name: Run Emoji Update Script |
44 |
| - env: |
45 |
| - PYTHONUNBUFFERED: 1 |
46 |
| - EMOJI_VERSION: ${{ env.VERSION }} |
47 |
| - run: | |
48 |
| - cd ${{ env.WORKING_DIR }} |
49 |
| - poetry run python emoji_generator/generator.py |
50 |
| -
|
51 |
| - - name: Push Changes and Create PR |
52 |
| - uses: peter-evans/create-pull-request@v7 |
53 |
| - with: |
| 43 | + - name: Install Dependencies |
| 44 | + run: | |
| 45 | + pip install --upgrade pip |
| 46 | + pip install poetry==2.0.1 |
| 47 | + poetry config virtualenvs.create true |
| 48 | + poetry install --no-root |
| 49 | +
|
| 50 | + - name: Run Emoji Update Script |
| 51 | + env: |
| 52 | + PYTHONUNBUFFERED: 1 |
| 53 | + EMOJI_VERSION: ${{ env.VERSION }} |
| 54 | + run: poetry run emoji-generator |
| 55 | + |
| 56 | + - name: Push Changes and Create PR |
| 57 | + uses: peter-evans/create-pull-request@v7 |
| 58 | + with: |
54 | 59 | commit-message: "chore(deps): update emoji.json to emojibase-data@${{ env.VERSION }}"
|
55 | 60 | title: "Update emoji.json to emojibase-data@${{ env.VERSION }}"
|
56 | 61 | body: |
|
|
60 | 65 | branch: dependencies/emoji-base-updates
|
61 | 66 | author: GitHub <[email protected]>
|
62 | 67 | delete-branch: true
|
| 68 | + token: ${{ steps.app-token.outputs.token }} |
| 69 | + labels: | |
| 70 | + dependencies |
| 71 | + feature |
0 commit comments