Skip to content

Commit e5b20f3

Browse files
committed
Merge branch 'github-actions'
2 parents fa47b55 + 51f57b1 commit e5b20f3

File tree

22 files changed

+314
-143
lines changed

22 files changed

+314
-143
lines changed

.azure-pipelines/release.yml

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

.azure-pipelines/steps/grammar-bundle/-load.yml

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

.azure-pipelines/steps/grammar-bundle/-save.yml

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

.azure-pipelines/steps/grammar-bundle/-upload.yml

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

.github/script/setup

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
# Any additional setup for macOS/Linux should go here.

.github/script/setup-cask

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
git clone -b github-actions https://github.com/ubolonton/cask "$HOME"/.cask
4+
echo "$HOME/.cask/bin" >> "$GITHUB_PATH"

.github/script/setup-cask.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
git clone -b github-actions https://github.com/ubolonton/cask "$env:UserProfile\.cask"
2+
echo "$env:UserProfile\.cask\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

.github/script/setup.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
iex (New-Object net.webclient).downloadstring('https://get.scoop.sh')
2+
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $env:GITHUB_PATH
3+
scoop bucket add extras
4+
scoop bucket add nonportable
5+
scoop update
6+
scoop checkup
7+
8+
scoop install tar

.github/workflows/bump-version.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: bump-version
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- repos/**
9+
10+
jobs:
11+
bump-version:
12+
runs-on: ubuntu-18.04
13+
steps:
14+
- uses: purcell/setup-emacs@v3.0
15+
with:
16+
version: '27.2'
17+
- uses: actions/checkout@v2
18+
19+
- name: Bump version
20+
run: script/dev bump-version
21+
22+
# This will not trigger workflows, because it doesn't use a personal access token.
23+
- name: Create the release commit
24+
# TODO: Sign the tag?
25+
run: |
26+
git add --update
27+
git config --global user.name 'Tuấn-Anh Nguyễn'
28+
git config --global user.email 'ubolonton@users.noreply.github.com'
29+
RELEASE_VERSION=$(script/dev current-version)
30+
git commit -m "Release $RELEASE_VERSION"
31+
echo RELEASE_VERSION=$RELEASE_VERSION >> $GITHUB_ENV
32+
echo RELEASE_SHA=$(git rev-parse HEAD) >> $GITHUB_ENV
33+
git push
34+
35+
- name: Create the release tag
36+
uses: actions/github-script@v4
37+
with:
38+
# Use personal access token to trigger the release workflow.
39+
github-token: ${{ secrets.PAT }}
40+
script: |
41+
github.git.createRef({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
ref: "refs/tags/${{ env.RELEASE_VERSION }},
45+
sha: "${{ env.RELEASE_SHA }}"
46+
})

.github/workflows/main.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
runs-on: ${{ matrix.os }}
3939
steps:
4040
- uses: actions/checkout@v2
41+
- run: .github/script/setup
4142

4243
- name: Install tree-sitter CLI
4344
run: npm install -g tree-sitter-cli@0.19.3
@@ -51,36 +52,12 @@ jobs:
5152
with:
5253
version: ${{ matrix.emacs-version }}
5354

54-
- name: Set up cask
55-
if: runner.os != 'Windows'
56-
run: |
57-
git clone -b github-actions https://github.com/ubolonton/cask "$HOME"/.cask
58-
echo "$HOME/.cask/bin" >> $GITHUB_PATH
59-
- name: Set up cask (Windows)
60-
if: runner.os == 'Windows'
61-
run: |
62-
git clone -b github-actions https://github.com/ubolonton/cask "$env:UserProfile\.cask"
63-
echo "$env:UserProfile\.cask\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
64-
55+
- run: .github/script/setup-cask
6556
- run: cask install
6657

6758
- run: script/compile all
6859
continue-on-error: true
6960

70-
- name: Check binaries
71-
if: runner.os == 'Linux'
72-
run: |
73-
ldd bin/*.so
74-
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75-
ldd $(which emacs)
61+
- run: script/inspect-binaries
7662
continue-on-error: true
77-
78-
- name: Check binaries
79-
if: runner.os == 'macOS'
80-
run: |
81-
otool -L bin/*.dylib
82-
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83-
otool -L $(which emacs)
84-
continue-on-error: true
85-
8663
- run: script/test

0 commit comments

Comments
 (0)