Skip to content

Commit 397c240

Browse files
einelazka
authored andcommitted
v2.1.3 4d3b22f
1 parent c2bef8a commit 397c240

File tree

2 files changed

+22
-40
lines changed

2 files changed

+22
-40
lines changed

README.md

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@
1010

1111
# Setup MSYS2
1212

13-
[MSYS2](https://www.msys2.org/) is available by default in [windows-latest](https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md#msys2) virtual environment for GitHub Actions. However, the default installation is updated every ~10 days, and it includes some pre-installed packages. As a result, startup time can be up to 10 min. Moreover, MSYS2/MINGW are neither added to the PATH nor available as a custom `shell` option.
13+
**setup-msys2** is a JavaScript GitHub Action (GHA) to setup an [MSYS2](https://www.msys2.org/) environment (i.e. MSYS, MINGW32 and/or MINGW64 shells) using the GHA [toolkit](https://github.com/actions/toolkit) for automatic caching.
1414

15-
**setup-msys2** is a JavaScript GitHub Action (GHA) to optionally setup an up-to-date and stable [MSYS2](https://www.msys2.org/) environment in a temporal location, using the GHA [toolkit](https://github.com/actions/toolkit). Moreover, it provides a custom entrypoint.
15+
## Context
1616

17-
If option `release` is `false`, the default installation is used. Otherwise (by default), the latest tarball available at [repo.msys2.org/distrib/x86_64](http://repo.msys2.org/distrib/x86_64/) is downloaded and extracted.
17+
[MSYS2](https://www.msys2.org/) is available by default in [windows-latest](https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md#msys2) [virtual environment](https://github.com/actions/virtual-environments) for GitHub Actions, located at `C:\msys64`. Moreover, there is work in progress for making `bash` default to MSYS2 (see [actions/virtual-environments#1525](https://github.com/actions/virtual-environments/issues/1525)). However, the default installation has some caveats at the moment (see [actions/virtual-environments#1572](https://github.com/actions/virtual-environments/issues/1572)):
18+
19+
- It is updated every ~10 days.
20+
- It includes a non-negligible set of pre-installed packages. As a result, update time can be up to 10 min.
21+
- Caching of installation packages is not supported.
22+
- MSYS2/MINGW are neither added to the PATH nor available as a custom `shell` option.
23+
24+
**setup-msys2** works around those constraints:
25+
26+
- Using option `release: false`, the default installation is used, but automatic caching is supported and a custom entrypoint is provided.
27+
- By default (`release: true`), **setup-msys2** downloads and extracts the latest tarball available at [repo.msys2.org/distrib/x86_64](http://repo.msys2.org/distrib/x86_64/), a clean and up-to-date environment is set up in a temporary location, and a custom entrypoint (`msys2`) is provided. Hence, the overhead of updating pre-installed but unnecessary packages is avoided.
28+
29+
Therefore, usage of this Action is recommended to all MSYS2 users of GitHub Actions, since caching and the custom entrypoint are provided regardless of option `release`.
1830

1931
## Usage
2032

@@ -54,7 +66,9 @@ In order to reduce verbosity, it is possible to set `msys2` as the default shell
5466
- uses: msys2/setup-msys2@v2
5567
with:
5668
update: true
57-
install: base-devel git
69+
install: >-
70+
base-devel
71+
git
5872
#- run: git config --global core.autocrlf input
5973
# shell: bash
6074
- uses: actions/checkout@v2
@@ -143,39 +157,7 @@ Installing additional packages after updating the system is supported through op
143157
- uses: msys2/setup-msys2@v2
144158
with:
145159
update: true
146-
install: 'git base-devel'
160+
install: >-
161+
git
162+
base-devel
147163
```
148-
149-
## Development
150-
151-
The steps to publish a new release are the following:
152-
153-
```sh
154-
# Remove/clean dir 'dist'
155-
rm -rf dist
156-
157-
# Package the action with ncc
158-
yarn pkg
159-
160-
# - Copy release artifacts to subdir dir
161-
# - Create a new orphan branch in a new empty repo
162-
# - Push the branch
163-
./release.sh v2.x.x
164-
165-
# Fetch the new branch and checkout it
166-
git fetch --all
167-
git checkout -b tmp origin/v2.x.x
168-
169-
# Reset the 'rolling' tag to the just released branch
170-
git tag -d v2
171-
git tag v2
172-
git push origin +v2
173-
174-
# Remove the temporal branch
175-
git checkout master
176-
git branch -D tmp
177-
```
178-
179-
> NOTE: although it feels unidiomatic having 'rolling' tags and/or storing release assets in specific branches, it is the recommended solution. Retrieving assets from GitHub Releases is not supported by GitHub Actions (yet). See [actions/javascript-action: Create a release branch](https://github.com/actions/javascript-action#create-a-release-branch), [actions/toolkit: docs/action-versioning.md](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) and [actions/toolkit#214](https://github.com/actions/toolkit/issues/214).
180-
181-
> NOTE: tag `tag-for-git-describe` is used for testing `git describe --dirty --tags` in CI. See [actions/checkout#250](https://github.com/actions/checkout/issues/250).

index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)